Use a separate sensor watching function for gamepad events to avoid reliance on system sensor events and prevent a potential deadlock

This commit is contained in:
Sam Lantinga 2023-06-19 16:17:34 -07:00
parent 70e43c150e
commit 20ea35138f
3 changed files with 53 additions and 33 deletions

View file

@ -42,4 +42,7 @@ extern SDL_bool SDL_ShouldIgnoreGamepad(const char *name, SDL_JoystickGUID guid)
/* Handle delayed guide button on a gamepad */
extern void SDL_GamepadHandleDelayedGuideButton(SDL_Joystick *joystick);
/* Handle system sensor data */
extern void SDL_GamepadSensorWatcher(Uint64 timestamp, SDL_SensorID sensor, Uint64 sensor_timestamp, float *data, int num_values);
#endif /* SDL_gamepad_c_h_ */