From e516943d53612b6dcd22bcb29597f65678ac80aa Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 12 Sep 2023 18:10:06 -0500 Subject: [PATCH] Guard SDL_ControllerSensorEvent usage by SDL version check --- app/streaming/input/input.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/streaming/input/input.h b/app/streaming/input/input.h index 7799071c..65bd4f9a 100644 --- a/app/streaming/input/input.h +++ b/app/streaming/input/input.h @@ -19,6 +19,7 @@ struct GamepadState { SDL_TimerID mouseEmulationTimer; uint32_t lastStartDownTime; +#if SDL_VERSION_ATLEAST(2, 0, 14) uint8_t gyroReportPeriodMs; float lastGyroEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)]; uint32_t lastGyroEventTime; @@ -26,6 +27,7 @@ struct GamepadState { uint8_t accelReportPeriodMs; float lastAccelEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)]; uint32_t lastAccelEventTime; +#endif int buttons; short lsX, lsY;