From 3ba0060ac1fa1c39596c51d4bf259142e6d1847f Mon Sep 17 00:00:00 2001 From: Dan Everton Date: Mon, 13 Feb 2006 21:46:28 +0000 Subject: 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 --- uisimulator/win32/lcd-win32.c | 15 ++++++++++++++ uisimulator/win32/sound.c | 46 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) (limited to 'uisimulator/win32') diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c index a50fbd11f6..8afd025a16 100644 --- a/uisimulator/win32/lcd-win32.c +++ b/uisimulator/win32/lcd-win32.c @@ -22,6 +22,7 @@ #include "uisw32.h" #include "lcd.h" #include "lcd-playersim.h" +#include "debug.h" #if LCD_DEPTH == 16 unsigned short bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */ @@ -309,3 +310,17 @@ void simlcdinit(void) #endif } +#ifdef CONFIG_BACKLIGHT +void sim_backlight(int value) +{ + DEBUGF("backlight: %s\n", (value > 0) ? "on" : "off"); +} +#endif + +#ifdef HAVE_REMOTE_LCD +void sim_remote_backlight(int value) +{ + DEBUGF("remote backlight: %s\n", (value > 0) ? "on" : "off"); +} +#endif + diff --git a/uisimulator/win32/sound.c b/uisimulator/win32/sound.c index 02a5a888d9..54140f59e4 100644 --- a/uisimulator/win32/sound.c +++ b/uisimulator/win32/sound.c @@ -33,6 +33,8 @@ #include "thread-win32.h" #include "debug.h" +static bool playing = false; + void pcm_play_stop(void); static void sound_play_chunk(HWAVEOUT wave_out, LPWAVEHDR header, @@ -152,4 +154,48 @@ void sound_playback_thread(void) } } + +/* Stubs for PCM audio playback. */ +bool pcm_is_playing(void) +{ + return playing; +} + +void pcm_mute(bool state) +{ + (void)state; +} + +void pcm_play_pause(bool state) +{ + (void)state; +} + +bool pcm_is_paused(void) +{ + return false; +} + +void pcm_play_stop(void) +{ + playing = false; +} + +void pcm_init(void) +{ +} + +void (*sound_get_pcm)(unsigned char** start, long* size); +void pcm_play_data(void (*get_more)(unsigned char** start, long* size)) +{ + sound_get_pcm = get_more; + playing = true; +} + +long pcm_get_bytes_waiting(void) +{ + return 0; +} + + #endif /* ROCKBOX_HAS_SIMSOUND */ -- cgit v1.2.3