Avoid potential overflow in gamepad sensor report rate period

This commit is contained in:
Cameron Gutman committed 2026-11-15 01:02:12 -06:00
1 parent 136610d5fd
commit dab3e23cc4
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -23,11 +23,11 @@ struct GamepadState {
bool emulatedClickpadButtonDown;
#if SDL_VERSION_ATLEAST(2, 0, 14)
uint8_t gyroReportPeriodMs;
uint16_t gyroReportPeriodMs;
float lastGyroEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)];
uint32_t lastGyroEventTime;
uint8_t accelReportPeriodMs;
uint16_t accelReportPeriodMs;
float lastAccelEventData[SDL_arraysize(SDL_ControllerSensorEvent::data)];
uint32_t lastAccelEventTime;
#endif