mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-03 06:16:12 +00:00
Guard SDL_ControllerSensorEvent usage by SDL version check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user