Add capacitive sense gamepad events (#15627)

This commit is contained in:
ceski 2026-05-17 08:26:29 -07:00 committed by GitHub
parent 984fcdaa8a
commit 5b98c1cc2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 457 additions and 27 deletions

View file

@ -2213,6 +2213,16 @@ SDL_AppResult SDLCALL SDL_AppEvent(void *appstate, SDL_Event *event)
}
break;
case SDL_EVENT_GAMEPAD_CAPSENSE_TOUCH:
case SDL_EVENT_GAMEPAD_CAPSENSE_RELEASE:
#ifdef VERBOSE_CAPSENSE
SDL_Log("Gamepad %" SDL_PRIu32 " capsense %u %s",
event->gcapsense.which,
event->gcapsense.capsense,
event->gcapsense.down ? "touch" : "release");
#endif /* VERBOSE_CAPSENSE */
break;
case SDL_EVENT_MOUSE_BUTTON_DOWN:
if (virtual_joystick && controller && controller->joystick == virtual_joystick) {
VirtualGamepadMouseDown(event->button.x, event->button.y);