summaryrefslogtreecommitdiff
path: root/uisimulator/win32/lcd-win32.c
diff options
context:
space:
mode:
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 @@
28 28
29// varaibles 29// varaibles
30unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display 30unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display
31char bitmap[LCD_WIDTH][LCD_HEIGHT]; // the ui display 31char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display
32 32
33BITMAPINFO2 bmi = 33BITMAPINFO2 bmi =
34{ 34{
35 sizeof (BITMAPINFOHEADER), 35 sizeof (BITMAPINFOHEADER),
36 LCD_WIDTH, -LCD_HEIGHT, 1, 8, 36 LCD_WIDTH, -LCD_HEIGHT, 1, 8,
37 BI_RGB, 0, 0, 0, 2, 2, 37 BI_RGB, 0, 0, 0, 2, 2,
38 UI_LCD_COLOR, 0, // green background color 38 UI_LCD_BGCOLOR, 0, // green background color
39 UI_LCD_BLACK, 0 // black color 39 UI_LCD_BLACK, 0 // black color
40}; // bitmap information 40}; // bitmap information
41 41
@@ -63,4 +63,24 @@ void lcd_update()
63 63
64 // natural sleep :) 64 // natural sleep :)
65 Sleep (50); 65 Sleep (50);
66}
67
68// lcd_backlight
69// set backlight state of lcd
70void lcd_backlight (
71 bool on // switch backlight on or off?
72 )
73{
74 if (on)
75 {
76 RGBQUAD blon = {UI_LCD_BGCOLORLIGHT, 0};
77 bmi.bmiColors[0] = blon;
78 }
79 else
80 {
81 RGBQUAD blon = {UI_LCD_BGCOLOR, 0};
82 bmi.bmiColors[0] = blon;
83 }
84
85 InvalidateRect (hGUIWnd, NULL, FALSE);
66} \ No newline at end of file 86} \ No newline at end of file