mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Guard SDL_ControllerSensorEvent usage by SDL version check
This commit is contained in:
@@ -19,6 +19,7 @@ struct GamepadState {
|
|||||||
SDL_TimerID mouseEmulationTimer;
|
SDL_TimerID mouseEmulationTimer;
|
||||||
uint32_t lastStartDownTime;
|
uint32_t lastStartDownTime;
|
||||||
|
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 0, 14)
|
||||||
uint8_t gyroReportPeriodMs;
|
uint8_t gyroReportPeriodMs;
|
||||||
float lastGyroEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)];
|
float lastGyroEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)];
|
||||||
uint32_t lastGyroEventTime;
|
uint32_t lastGyroEventTime;
|
||||||
@@ -26,6 +27,7 @@ struct GamepadState {
|
|||||||
uint8_t accelReportPeriodMs;
|
uint8_t accelReportPeriodMs;
|
||||||
float lastAccelEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)];
|
float lastAccelEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)];
|
||||||
uint32_t lastAccelEventTime;
|
uint32_t lastAccelEventTime;
|
||||||
|
#endif
|
||||||
|
|
||||||
int buttons;
|
int buttons;
|
||||||
short lsX, lsY;
|
short lsX, lsY;
|
||||||
|
|||||||
Reference in New Issue
Block a user