Removed problematic call to ISensor_SetEventSink()

Fixes https://github.com/libsdl-org/SDL/issues/5288
main
Sam Lantinga 2022-03-17 10:01:13 -07:00
parent bcb0f1de23
commit e8c3ff56e0
1 changed files with 4 additions and 1 deletions

View File

@ -325,7 +325,10 @@ static int DisconnectSensor(ISensor *sensor)
for (i = 0; i < SDL_num_sensors; ++i) { for (i = 0; i < SDL_num_sensors; ++i) {
old_sensor = &SDL_sensors[i]; old_sensor = &SDL_sensors[i];
if (sensor == old_sensor->sensor) { if (sensor == old_sensor->sensor) {
ISensor_SetEventSink(sensor, NULL); /* This call hangs for some reason:
* https://github.com/libsdl-org/SDL/issues/5288
*/
/*ISensor_SetEventSink(sensor, NULL);*/
ISensor_Release(sensor); ISensor_Release(sensor);
SDL_free(old_sensor->name); SDL_free(old_sensor->name);
--SDL_num_sensors; --SDL_num_sensors;