summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/uisdl.c
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2006-02-13 21:46:28 +0000
committerDan Everton <dan@iocaine.org>2006-02-13 21:46:28 +0000
commit3ba0060ac1fa1c39596c51d4bf259142e6d1847f (patch)
tree71428db81254a9901fbf3e8a92c71f0f57410cd2 /uisimulator/sdl/uisdl.c
parentdd39e33663a4b617c3f88f48845681e772386a7f (diff)
downloadrockbox-3ba0060ac1fa1c39596c51d4bf259142e6d1847f.tar.gz
rockbox-3ba0060ac1fa1c39596c51d4bf259142e6d1847f.zip
Backlight support for 8-bit targets in SDL sim. Redo sound handling. Still doesn't work right, but is closer to how the actual Rockbox system does it. Move some stub functions in to Win32 and X11 sims to keep them compiling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8686 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/uisdl.c')
-rw-r--r--uisimulator/sdl/uisdl.c19
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
51SDL_Thread *gui_thread; 50SDL_Thread *gui_thread;
52SDL_TimerID tick_timer_id; 51SDL_TimerID tick_timer_id;
53#ifdef ROCKBOX_HAS_SIMSOUND
54SDL_Thread *sound_thread;
55#endif
56 52
57bool lcd_display_redraw = true; /* Used for player simulator */ 53bool lcd_display_redraw = true; /* Used for player simulator */
58char having_new_lcd=true; /* Used for player simulator */ 54char 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();