mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-14 23:47:09 +00:00
Guard SDL_ControllerSensorEvent usage by SDL version check
This commit is contained in:
parent
fd41226cdd
commit
e516943d53
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue