added clearing virtual buttons when clearing player action
authorHolger Schemel <info@artsoft.org>
Sun, 4 Oct 2020 22:57:27 +0000 (00:57 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 4 Oct 2020 22:57:27 +0000 (00:57 +0200)
src/events.c

index a7732a8e857ae91e289e1c860faea4b9daf5742d..69efaf508189e9631cb3b7f3b08f608f364922f5 100644 (file)
@@ -443,6 +443,9 @@ void ClearPlayerAction(void)
     stored_player[i].snap_action = 0;
   }
 
+  // simulate finger release events for still pressed virtual buttons
+  overlay.grid_button_action = JOY_NO_ACTION;
+
   ClearTouchInfo();
   ClearJoystickState();
   ClearPlayerMouseAction();