mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Fix simulator crashing on MacOS
Event handling must happen on the main thread for MacOS. Not sure if button_queue_wait is the best place for doing the SDL event polling, but seems to work ok. Change-Id: If928282df84bdd74e24a48afd7dbc4c4bfcc49e2
This commit is contained in:
parent
1745b74576
commit
f1010005b0
5 changed files with 44 additions and 0 deletions
|
@ -307,6 +307,15 @@ static bool event_handler(SDL_Event *event)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
void handle_sdl_events(void)
|
||||
{
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event))
|
||||
event_handler(&event);
|
||||
}
|
||||
#endif
|
||||
|
||||
void gui_message_loop(void)
|
||||
{
|
||||
SDL_Event event;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue