SDL_SendJoystickVirtualSensorDataInner(): Fix max_sensor_events increment

This commit is contained in:
Petar Popovic authored and Sam Lantinga committed 2025-08-08 12:48:06 -07:00
1 parent de742e9f9a
commit d9c20cfd0a
1 file changed
+1 -1
+1 -1
View File
@@ -471,7 +471,7 @@ bool SDL_SendJoystickVirtualSensorDataInner(SDL_Joystick *joystick, SDL_SensorTy
return false;
}
hwdata->sensor_events = sensor_events;
hwdata->max_sensor_events = hwdata->max_sensor_events;
hwdata->max_sensor_events = new_max_sensor_events;
}
VirtualSensorEvent *event = &hwdata->sensor_events[hwdata->num_sensor_events++];