#if defined(TARGET_SDL2)
case SDL_CONTROLLERBUTTONDOWN:
case SDL_CONTROLLERBUTTONUP:
+ // for any game controller button event, disable overlay buttons
+ SetOverlayEnabled(FALSE);
+
HandleSpecialGameControllerButtons(event);
+
/* FALL THROUGH */
case SDL_CONTROLLERDEVICEADDED:
case SDL_CONTROLLERDEVICEREMOVED:
"KEY_PRESSED");
int i;
+ // for any touch input event, enable overlay buttons (if activated)
+ SetOverlayEnabled(TRUE);
+
Error(ERR_DEBUG, "::: key '%s' was '%s' [fingerId: %lld]",
getKeyNameFromKey(key), key_status_name, event->fingerId);
#endif
#if defined(PLATFORM_ANDROID)
- // always map the "back" button to the "escape" key on Android devices
if (key == KSYM_Back)
+ {
+ // always map the "back" button to the "escape" key on Android devices
key = KSYM_Escape;
+ }
+ else
+ {
+ // for any key event other than "back" button, disable overlay buttons
+ SetOverlayEnabled(FALSE);
+ }
#endif
HandleKeyModState(keymod, key_status);