mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-09 12:58:12 +00:00
Fixed bug 4391 - hid_enumerate() sometimes causes game to freeze for a few seconds
Daniel Gibson Even though my game (dhewm3) doesn't use SDL_INIT_JOYSTICK, SDL_PumpEvent() calls SDL_JoystickUpdate() which ends up calling hid_enumerate() every three seconds, and sometimes on my Win7 box hid_enumerate() takes about 5 seconds, which causes the whole game to freeze for that time.
This commit is contained in:
@@ -505,6 +505,10 @@ SDL_SensorUpdate(void)
|
||||
int i;
|
||||
SDL_Sensor *sensor;
|
||||
|
||||
if (!SDL_WasInit(SDL_INIT_SENSOR)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_LockSensors();
|
||||
|
||||
if (SDL_updating_sensor) {
|
||||
|
Reference in New Issue
Block a user