Commit e8c3ff56e05f83dcdb891c11d77ac5a9520cf718

Sam Lantinga 2022-03-17T10:01:13

Removed problematic call to ISensor_SetEventSink() Fixes https://github.com/libsdl-org/SDL/issues/5288

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/sensor/windows/SDL_windowssensor.c b/src/sensor/windows/SDL_windowssensor.c
index bb8d39e..21b119d 100644
--- a/src/sensor/windows/SDL_windowssensor.c
+++ b/src/sensor/windows/SDL_windowssensor.c
@@ -325,7 +325,10 @@ static int DisconnectSensor(ISensor *sensor)
     for (i = 0; i < SDL_num_sensors; ++i) {
         old_sensor = &SDL_sensors[i];
         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);
             SDL_free(old_sensor->name);
             --SDL_num_sensors;