mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-23 22:15:05 +00:00
Use SDL_GetStringBoolean() to parse the hint value
This commit is contained in:
parent
8f5932dc2e
commit
29265d0738
|
@ -216,7 +216,7 @@ SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID instance_id)
|
||||||
static void SDLCALL
|
static void SDLCALL
|
||||||
SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
||||||
{
|
{
|
||||||
if (hint && *hint == '1') {
|
if (SDL_GetStringBoolean(hint, SDL_FALSE)) {
|
||||||
SDL_joystick_allows_background_events = SDL_TRUE;
|
SDL_joystick_allows_background_events = SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
SDL_joystick_allows_background_events = SDL_FALSE;
|
SDL_joystick_allows_background_events = SDL_FALSE;
|
||||||
|
|
Loading…
Reference in a new issue