diff options
author | Dan Everton <dan@iocaine.org> | 2006-02-13 21:46:28 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2006-02-13 21:46:28 +0000 |
commit | 3ba0060ac1fa1c39596c51d4bf259142e6d1847f (patch) | |
tree | 71428db81254a9901fbf3e8a92c71f0f57410cd2 /uisimulator/sdl/lcd-charcell.c | |
parent | dd39e33663a4b617c3f88f48845681e772386a7f (diff) | |
download | rockbox-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/lcd-charcell.c')
-rw-r--r-- | uisimulator/sdl/lcd-charcell.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/uisimulator/sdl/lcd-charcell.c b/uisimulator/sdl/lcd-charcell.c index 5f51e44810..2ef86d0baf 100644 --- a/uisimulator/sdl/lcd-charcell.c +++ b/uisimulator/sdl/lcd-charcell.c | |||
@@ -23,7 +23,8 @@ | |||
23 | #include "lcd-sdl.h" | 23 | #include "lcd-sdl.h" |
24 | 24 | ||
25 | SDL_Surface* lcd_surface; | 25 | SDL_Surface* lcd_surface; |
26 | SDL_Color lcd_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; | 26 | SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; |
27 | SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; | ||
27 | SDL_Color lcd_color_max = {0, 0, 0, 0}; | 28 | SDL_Color lcd_color_max = {0, 0, 0, 0}; |
28 | 29 | ||
29 | /* Defined in lcd-playersim.c */ | 30 | /* Defined in lcd-playersim.c */ |
@@ -104,6 +105,19 @@ void drawrectangles(int color, struct rectangle *points, int count) | |||
104 | SDL_UnlockSurface(lcd_surface); | 105 | SDL_UnlockSurface(lcd_surface); |
105 | } | 106 | } |
106 | 107 | ||
108 | #ifdef CONFIG_BACKLIGHT | ||
109 | void sim_backlight(int value) | ||
110 | { | ||
111 | if (value > 0) { | ||
112 | sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, (1<<LCD_DEPTH)); | ||
113 | } else { | ||
114 | sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, (1<<LCD_DEPTH)); | ||
115 | } | ||
116 | |||
117 | lcd_update(); | ||
118 | } | ||
119 | #endif | ||
120 | |||
107 | /* initialise simulator lcd driver */ | 121 | /* initialise simulator lcd driver */ |
108 | void sim_lcd_init(void) | 122 | void sim_lcd_init(void) |
109 | { | 123 | { |