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 a7732a8..69efaf5 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();