diff options
Diffstat (limited to 'uisimulator/sdl/uisdl.c')
-rw-r--r-- | uisimulator/sdl/uisdl.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c index 178090403f..1e36bfa223 100644 --- a/uisimulator/sdl/uisdl.c +++ b/uisimulator/sdl/uisdl.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "button.h" | 23 | #include "button.h" |
24 | #include "thread.h" | 24 | #include "thread.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | #include "sound.h" | ||
27 | #include "uisdl.h" | 26 | #include "uisdl.h" |
28 | #include "lcd-sdl.h" | 27 | #include "lcd-sdl.h" |
29 | #ifdef HAVE_LCD_BITMAP | 28 | #ifdef HAVE_LCD_BITMAP |
@@ -50,9 +49,6 @@ bool background = false; /* Don't use backgrounds by default */ | |||
50 | 49 | ||
51 | SDL_Thread *gui_thread; | 50 | SDL_Thread *gui_thread; |
52 | SDL_TimerID tick_timer_id; | 51 | SDL_TimerID tick_timer_id; |
53 | #ifdef ROCKBOX_HAS_SIMSOUND | ||
54 | SDL_Thread *sound_thread; | ||
55 | #endif | ||
56 | 52 | ||
57 | bool lcd_display_redraw = true; /* Used for player simulator */ | 53 | bool lcd_display_redraw = true; /* Used for player simulator */ |
58 | char having_new_lcd=true; /* Used for player simulator */ | 54 | char having_new_lcd=true; /* Used for player simulator */ |
@@ -68,8 +64,7 @@ Uint32 tick_timer(Uint32 interval, void *param) | |||
68 | 64 | ||
69 | new_tick = (SDL_GetTicks() - start_tick) * HZ / 1000; | 65 | new_tick = (SDL_GetTicks() - start_tick) * HZ / 1000; |
70 | 66 | ||
71 | if (new_tick != current_tick) | 67 | if (new_tick != current_tick) { |
72 | { | ||
73 | long i; | 68 | long i; |
74 | for (i = new_tick - current_tick; i > 0; i--) | 69 | for (i = new_tick - current_tick; i > 0; i--) |
75 | sim_tick_tasks(); | 70 | sim_tick_tasks(); |
@@ -171,9 +166,6 @@ bool gui_shutdown() | |||
171 | 166 | ||
172 | SDL_KillThread(gui_thread); | 167 | SDL_KillThread(gui_thread); |
173 | SDL_RemoveTimer(tick_timer_id); | 168 | SDL_RemoveTimer(tick_timer_id); |
174 | #ifdef ROCKBOX_HAS_SIMSOUND | ||
175 | SDL_KillThread(sound_thread); | ||
176 | #endif | ||
177 | 169 | ||
178 | for (i = 0; i < threadCount; i++) | 170 | for (i = 0; i < threadCount; i++) |
179 | { | 171 | { |
@@ -223,7 +215,6 @@ int main(int argc, char *argv[]) | |||
223 | background = false; | 215 | background = false; |
224 | } | 216 | } |
225 | 217 | ||
226 | |||
227 | if (!gui_startup()) | 218 | if (!gui_startup()) |
228 | return -1; | 219 | return -1; |
229 | 220 | ||
@@ -235,14 +226,6 @@ int main(int argc, char *argv[]) | |||
235 | 226 | ||
236 | tick_timer_id = SDL_AddTimer(10, tick_timer, NULL); | 227 | tick_timer_id = SDL_AddTimer(10, tick_timer, NULL); |
237 | 228 | ||
238 | #ifdef ROCKBOX_HAS_SIMSOUND | ||
239 | sound_thread = SDL_CreateThread(sound_playback_thread, NULL); | ||
240 | if (sound_thread == NULL) { | ||
241 | printf("Error creating sound thread!\n"); | ||
242 | return -1; | ||
243 | } | ||
244 | #endif | ||
245 | |||
246 | gui_message_loop(); | 229 | gui_message_loop(); |
247 | 230 | ||
248 | return gui_shutdown(); | 231 | return gui_shutdown(); |