fixed bug with handling released game controller buttons
authorHolger Schemel <info@artsoft.org>
Sun, 2 Jul 2017 22:25:04 +0000 (00:25 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 2 Jul 2017 22:25:43 +0000 (00:25 +0200)
src/events.c
src/tools.c

index dccf50030d251c58bf543a94ee820a4dec3372a9..69d7a2120a6fe78f2c7536f16954c2fb4908cc2d 100644 (file)
@@ -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
index 596aa5d0d68ef665c149a66e4d344dfac3daf74c..626cb8973a892c62612bf68454ebc6f488251ac7 100644 (file)
@@ -3963,6 +3963,7 @@ static int RequestHandleEvents(unsigned int req_state)
            break;
 
          case SDL_CONTROLLERBUTTONUP:
+           HandleJoystickEvent(&event);
            ClearPlayerAction();
            break;
 #endif