summaryrefslogtreecommitdiff
path: root/uisimulator/sdl
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-06-03 12:09:12 +0000
committerJens Arnold <amiconn@rockbox.org>2006-06-03 12:09:12 +0000
commitae0c1af6ce39b2dc770d33f3a4fb1cdb1308533f (patch)
tree0cb84b60f90f3ed37f277bef2d8fc3fca18916de /uisimulator/sdl
parent9ae0c957c8749bba29caea3dc0be37582f6b56b4 (diff)
downloadrockbox-ae0c1af6ce39b2dc770d33f3a4fb1cdb1308533f.tar.gz
rockbox-ae0c1af6ce39b2dc770d33f3a4fb1cdb1308533f.zip
Adjustments for simulating a backlight-modded Ondio.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10038 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r--uisimulator/sdl/lcd-bitmap.c9
-rw-r--r--uisimulator/sdl/uisdl.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c
index da4050461c..d6e9f90a7f 100644
--- a/uisimulator/sdl/lcd-bitmap.c
+++ b/uisimulator/sdl/lcd-bitmap.c
@@ -25,8 +25,10 @@ SDL_Surface* lcd_surface;
25int lcd_backlight_val; 25int lcd_backlight_val;
26 26
27#if LCD_DEPTH <= 8 27#if LCD_DEPTH <= 8
28SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; 28#ifdef CONFIG_BACKLIGHT
29SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; 29SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0};
30#endif
31SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0};
30SDL_Color lcd_color_max = {0, 0, 0, 0}; 32SDL_Color lcd_color_max = {0, 0, 0, 0};
31#endif 33#endif
32 34
@@ -116,8 +118,13 @@ void sim_lcd_init(void)
116#endif 118#endif
117 119
118#if LCD_DEPTH <= 8 120#if LCD_DEPTH <= 8
121#ifdef CONFIG_BACKLIGHT
119 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, 122 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max,
120 0, (1<<LCD_DEPTH)); 123 0, (1<<LCD_DEPTH));
124#else
125 sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, 0,
126 (1<<LCD_DEPTH));
127#endif
121#endif 128#endif
122} 129}
123 130
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index 5296e6dfa4..afd9678f32 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -66,7 +66,7 @@
66#define UI_WIDTH 155 /* width of GUI window */ 66#define UI_WIDTH 155 /* width of GUI window */
67#define UI_HEIGHT 334 /* height of GUI window */ 67#define UI_HEIGHT 334 /* height of GUI window */
68#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */ 68#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no backlight) */
69#define UI_LCD_BGCOLORLIGHT 90, 145, 90 /* bkgnd color of LCD (backlight) */ 69#define UI_LCD_BGCOLORLIGHT 130, 180, 250 /* bkgnd color of LCD (backlight mod) */
70#define UI_LCD_BLACK 0, 0, 0 /* black */ 70#define UI_LCD_BLACK 0, 0, 0 /* black */
71#define UI_LCD_POSX 21 /* x position of lcd */ 71#define UI_LCD_POSX 21 /* x position of lcd */
72#define UI_LCD_POSY 82 /* y position of lcd (74 for real aspect) */ 72#define UI_LCD_POSY 82 /* y position of lcd (74 for real aspect) */