From: Holger Schemel Date: Sun, 2 Jul 2017 22:25:04 +0000 (+0200) Subject: fixed bug with handling released game controller buttons X-Git-Tag: 4.0.1.0~33 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b32084272306eebf14d2b63ea4dcd1a07994ed6f;p=rocksndiamonds.git fixed bug with handling released game controller buttons --- diff --git a/src/events.c b/src/events.c index dccf5003..69d7a212 100644 --- a/src/events.c +++ b/src/events.c @@ -354,6 +354,7 @@ void ClearEventQueue() #if defined(TARGET_SDL2) case SDL_CONTROLLERBUTTONUP: + HandleJoystickEvent(&event); ClearPlayerAction(); break; #endif @@ -399,6 +400,7 @@ void SleepWhileUnmapped() #if defined(TARGET_SDL2) case SDL_CONTROLLERBUTTONUP: + HandleJoystickEvent(&event); key_joystick_mapping = 0; break; #endif diff --git a/src/tools.c b/src/tools.c index 596aa5d0..626cb897 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3963,6 +3963,7 @@ static int RequestHandleEvents(unsigned int req_state) break; case SDL_CONTROLLERBUTTONUP: + HandleJoystickEvent(&event); ClearPlayerAction(); break; #endif