Fix build with old SDL versions

This commit is contained in:
Cameron Gutman 2023-08-30 00:02:09 -05:00
parent bf14d37cd5
commit 3904c82ee9

View File

@ -379,6 +379,7 @@ int sdlinput_handle_event(SDL_Window* window, SDL_Event* event) {
case SDL_CONTROLLERDEVICEREMOVED:
remove_gamepad(event->cdevice.which);
break;
#if SDL_VERSION_ATLEAST(2, 0, 14)
case SDL_CONTROLLERSENSORUPDATE:
gamepad = get_gamepad(event->csensor.which, false);
if (!gamepad)
@ -418,6 +419,7 @@ int sdlinput_handle_event(SDL_Window* window, SDL_Event* event) {
LiSendControllerTouchEvent(gamepad->id, touchEventType, event->ctouchpad.finger,
event->ctouchpad.x, event->ctouchpad.y, event->ctouchpad.pressure);
break;
#endif
}
return SDL_NOTHING;