diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-27 18:46:09 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-27 18:46:09 +0000 |
commit | deb1600bbc4d0e04f4560186fb665dc95b908e14 (patch) | |
tree | 455eb190bca5646be747d3a59d03122aa9c2b9ff /firmware/target/hosted/sdl/button-sdl.c | |
parent | 0dcf93ed18fe972198011246f27f9137fa863dd4 (diff) | |
download | rockbox-deb1600bbc4d0e04f4560186fb665dc95b908e14.tar.gz rockbox-deb1600bbc4d0e04f4560186fb665dc95b908e14.zip |
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
Diffstat (limited to 'firmware/target/hosted/sdl/button-sdl.c')
-rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); | |||
86 | extern bool debug_wps; | 86 | extern bool debug_wps; |
87 | extern bool mapping; | 87 | extern bool mapping; |
88 | 88 | ||
89 | void gui_message_loop(void) | 89 | bool gui_message_loop(void) |
90 | { | 90 | { |
91 | SDL_Event event; | 91 | SDL_Event event; |
92 | static int x,y,xybutton = 0; | 92 | static int x,y,xybutton = 0; |
@@ -176,8 +176,7 @@ void gui_message_loop(void) | |||
176 | case SDL_QUIT: | 176 | case SDL_QUIT: |
177 | { | 177 | { |
178 | sim_exit_irq_handler(); | 178 | sim_exit_irq_handler(); |
179 | exit(EXIT_SUCCESS); | 179 | return false; |
180 | break; | ||
181 | } | 180 | } |
182 | default: | 181 | default: |
183 | /*printf("Unhandled event\n"); */ | 182 | /*printf("Unhandled event\n"); */ |
@@ -185,6 +184,8 @@ void gui_message_loop(void) | |||
185 | } | 184 | } |
186 | sim_exit_irq_handler(); | 185 | sim_exit_irq_handler(); |
187 | } | 186 | } |
187 | |||
188 | return true; | ||
188 | } | 189 | } |
189 | 190 | ||
190 | static void button_event(int key, bool pressed) | 191 | static void button_event(int key, bool pressed) |