mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-19 12:40:34 +00:00
audio: More tweaking of device->thread_alive
This commit is contained in:
parent
f94ffd6092
commit
0999a090a7
1 changed files with 2 additions and 0 deletions
|
|
@ -668,6 +668,7 @@ void SDL_AudioThreadFinalize(SDL_AudioDevice *device)
|
|||
if (device->thread) {
|
||||
SDL_DetachThread(device->thread); // no one is waiting for us, just detach ourselves.
|
||||
device->thread = NULL;
|
||||
SDL_AtomicSet(&device->thread_alive, 0);
|
||||
}
|
||||
DestroyPhysicalAudioDevice(device);
|
||||
}
|
||||
|
|
@ -1085,6 +1086,7 @@ static void ClosePhysicalAudioDevice(SDL_AudioDevice *device)
|
|||
SDL_WaitThread(device->thread, NULL);
|
||||
device->thread = NULL;
|
||||
}
|
||||
SDL_AtomicSet(&device->thread_alive, 0);
|
||||
}
|
||||
|
||||
if (device->is_opened) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue