mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
sdl: fix shutdown hang on MacOS when SDL threads are used
Change-Id: I2179d2beed89beba1716072fc06b9cc090118364
This commit is contained in:
parent
dca70e1816
commit
5e09a9246c
1 changed files with 3 additions and 0 deletions
|
|
@ -157,6 +157,9 @@ void power_off(void)
|
||||||
/* since sim_thread_shutdown() grabs the mutex we need to let it free,
|
/* since sim_thread_shutdown() grabs the mutex we need to let it free,
|
||||||
* otherwise SDL_WaitThread will deadlock */
|
* otherwise SDL_WaitThread will deadlock */
|
||||||
struct thread_entry* t = sim_thread_unlock();
|
struct thread_entry* t = sim_thread_unlock();
|
||||||
|
|
||||||
|
if (!evt_thread) /* no event thread on MacOS */
|
||||||
|
sim_thread_shutdown();
|
||||||
#endif
|
#endif
|
||||||
/* wait for event thread to finish */
|
/* wait for event thread to finish */
|
||||||
SDL_WaitThread(evt_thread, NULL);
|
SDL_WaitThread(evt_thread, NULL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue