summaryrefslogtreecommitdiffstats
path: root/uisimulator/win32/lcd-win32.c
diff options
context:
space:
mode:
authorFelix Arends <edx@rockbox.org>2002-04-27 17:02:17 +0000
committerFelix Arends <edx@rockbox.org>2002-04-27 17:02:17 +0000
commitffb9e3a5bd1d9472b0cea2d9fba560ea0c58e58e (patch)
tree4c15d6a4d0878ef7f489506a0c9032f320df7cdf /uisimulator/win32/lcd-win32.c
parenta6ca085a35fc2b1739fc8d1e6cf064b45279e8ee (diff)
downloadrockbox-ffb9e3a5bd1d9472b0cea2d9fba560ea0c58e58e.tar.gz
rockbox-ffb9e3a5bd1d9472b0cea2d9fba560ea0c58e58e.zip
renamed cpp extensions to c, started coding file functions
file functions not working yet git-svn-id: svn://svn.rockbox.org/rockbox/trunk@262 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/lcd-win32.c')
-rw-r--r--uisimulator/win32/lcd-win32.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c
index 4539696cef..2330d444c5 100644
--- a/uisimulator/win32/lcd-win32.c
+++ b/uisimulator/win32/lcd-win32.c
@@ -28,14 +28,14 @@
// varaibles
unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display
-char bitmap[LCD_WIDTH][LCD_HEIGHT]; // the ui display
+char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display
BITMAPINFO2 bmi =
{
sizeof (BITMAPINFOHEADER),
LCD_WIDTH, -LCD_HEIGHT, 1, 8,
BI_RGB, 0, 0, 0, 2, 2,
- UI_LCD_COLOR, 0, // green background color
+ UI_LCD_BGCOLOR, 0, // green background color
UI_LCD_BLACK, 0 // black color
}; // bitmap information
@@ -63,4 +63,24 @@ void lcd_update()
// natural sleep :)
Sleep (50);
+}
+
+// lcd_backlight
+// set backlight state of lcd
+void lcd_backlight (
+ bool on // switch backlight on or off?
+ )
+{
+ if (on)
+ {
+ RGBQUAD blon = {UI_LCD_BGCOLORLIGHT, 0};
+ bmi.bmiColors[0] = blon;
+ }
+ else
+ {
+ RGBQUAD blon = {UI_LCD_BGCOLOR, 0};
+ bmi.bmiColors[0] = blon;
+ }
+
+ InvalidateRect (hGUIWnd, NULL, FALSE);
} \ No newline at end of file