Add capacitive sense gamepad events

This commit is contained in:
ceski 2026-05-16 22:14:14 -07:00
parent 71979477c7
commit b4091523db
25 changed files with 453 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_DOWN:
case SDL_EVENT_GAMEPAD_CAPSENSE_UP:
#ifdef VERBOSE_CAPSENSE
SDL_Log("Gamepad %" SDL_PRIu32 " capsense %u %s",
event->gcapsense.which,
event->gcapsense.capsense,
event->gcapsense.down ? "activated" : "deactivated");
#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);