From deb1600bbc4d0e04f4560186fb665dc95b908e14 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 27 May 2010 18:46:09 +0000 Subject: SDL Simulator: Get thread shutdown and properly handled and fix a minor memory leak that happens when threads exit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26336 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/hosted/sdl/button-sdl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'firmware/target/hosted/sdl/button-sdl.c') diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index e9fc03792c..15633eede5 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c @@ -86,7 +86,7 @@ static void button_event(int key, bool pressed); extern bool debug_wps; extern bool mapping; -void gui_message_loop(void) +bool gui_message_loop(void) { SDL_Event event; static int x,y,xybutton = 0; @@ -176,8 +176,7 @@ void gui_message_loop(void) case SDL_QUIT: { sim_exit_irq_handler(); - exit(EXIT_SUCCESS); - break; + return false; } default: /*printf("Unhandled event\n"); */ @@ -185,6 +184,8 @@ void gui_message_loop(void) } sim_exit_irq_handler(); } + + return true; } static void button_event(int key, bool pressed) -- cgit v1.2.3