mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-10 00:25:28 +00:00
pulseaudio: Hotplug thread fixes.
This used a tiny stack, which apparently upsets Blender for various technical reasons. Instead, just use the default stack size, which should give it plenty of space to work. If the thread failed to create, we would then wait on a semaphore that would never trigger, so don't do that anymore! Fixes #10806. (cherry-picked from commitb7dc30ca24) (cherry picked from commit58f2586b44)
This commit is contained in:
parent
d32189918b
commit
e9efcfb428
1 changed files with 6 additions and 2 deletions
|
|
@ -897,8 +897,12 @@ static void PULSEAUDIO_DetectDevices(void)
|
|||
|
||||
/* ok, we have a sane list, let's set up hotplug notifications now... */
|
||||
SDL_AtomicSet(&pulseaudio_hotplug_thread_active, 1);
|
||||
pulseaudio_hotplug_thread = SDL_CreateThreadInternal(HotplugThread, "PulseHotplug", 256 * 1024, ready_sem); /* !!! FIXME: this can probably survive in significantly less stack space. */
|
||||
SDL_SemWait(ready_sem);
|
||||
pulseaudio_hotplug_thread = SDL_CreateThreadInternal(HotplugThread, "PulseHotplug", 0, ready_sem);
|
||||
if (pulseaudio_hotplug_thread) {
|
||||
SDL_SemWait(ready_sem);
|
||||
} else {
|
||||
SDL_AtomicSet(&pulseaudio_hotplug_thread_active, 0); // thread failed to start, we'll go on without hotplug.
|
||||
}
|
||||
SDL_DestroySemaphore(ready_sem);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue