mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 02:07:49 +00:00
Fixed deadlock shutting down Android sensors
This commit is contained in:
parent
d9f09e77f2
commit
a9f6950657
1 changed files with 4 additions and 0 deletions
|
|
@ -258,7 +258,11 @@ static void SDL_ANDROID_SensorClose(SDL_Sensor *sensor)
|
|||
|
||||
static void SDL_ANDROID_SensorQuit(void)
|
||||
{
|
||||
/* All sensors are closed, but we need to unblock the sensor thread */
|
||||
SDL_AssertSensorsLocked();
|
||||
SDL_UnlockSensors();
|
||||
SDL_ANDROID_StopSensorThread(&SDL_sensor_thread_context);
|
||||
SDL_LockSensors();
|
||||
|
||||
if (SDL_sensors) {
|
||||
SDL_free(SDL_sensors);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue