added disabling overlay touch buttons when using joystick
authorHolger Schemel <info@artsoft.org>
Sun, 9 Aug 2020 23:14:31 +0000 (01:14 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 9 Aug 2020 23:14:31 +0000 (01:14 +0200)
src/libgame/sdl.c

index 41af967e18a1e583c3212c3877ba1e503a458d30..93c6cd0157bab9273c2f8961b9b4941c361dbd6d 100644 (file)
@@ -2557,6 +2557,9 @@ static void setJoystickButton(int nr, int button_id_raw, int button_state)
 
 void HandleJoystickEvent(Event *event)
 {
 
 void HandleJoystickEvent(Event *event)
 {
+  // when using joystick, disable overlay touch buttons
+  runtime.uses_touch_device = FALSE;
+
   switch (event->type)
   {
     case SDL_CONTROLLERDEVICEADDED:
   switch (event->type)
   {
     case SDL_CONTROLLERDEVICEADDED: