summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/button.c10
-rw-r--r--uisimulator/sdl/lcd-bitmap.c8
-rw-r--r--uisimulator/sdl/lcd-charcell.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index f5da828914..6f274dd56d 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -49,7 +49,7 @@ struct event_queue button_queue;
49 49
50static int btn = 0; /* Hopefully keeps track of currently pressed keys... */ 50static int btn = 0; /* Hopefully keeps track of currently pressed keys... */
51 51
52#ifdef CONFIG_BACKLIGHT 52#if CONFIG_BACKLIGHT
53static bool filter_first_keypress; 53static bool filter_first_keypress;
54 54
55void set_backlight_filter_keypress(bool value) 55void set_backlight_filter_keypress(bool value)
@@ -76,7 +76,7 @@ void button_event(int key, bool pressed)
76 static int repeat_count = 0; 76 static int repeat_count = 0;
77 static bool repeat = false; 77 static bool repeat = false;
78 static bool post = false; 78 static bool post = false;
79#ifdef CONFIG_BACKLIGHT 79#if CONFIG_BACKLIGHT
80 static bool skip_release = false; 80 static bool skip_release = false;
81#ifdef HAVE_REMOTE_LCD 81#ifdef HAVE_REMOTE_LCD
82 static bool skip_remote_release = false; 82 static bool skip_remote_release = false;
@@ -520,7 +520,7 @@ void button_event(int key, bool pressed)
520 diff = btn ^ lastbtn; 520 diff = btn ^ lastbtn;
521 if(diff && (btn & diff) == 0) 521 if(diff && (btn & diff) == 0)
522 { 522 {
523#ifdef CONFIG_BACKLIGHT 523#if CONFIG_BACKLIGHT
524#ifdef HAVE_REMOTE_LCD 524#ifdef HAVE_REMOTE_LCD
525 if(diff & BUTTON_REMOTE) 525 if(diff & BUTTON_REMOTE)
526 if(!skip_remote_release) 526 if(!skip_remote_release)
@@ -587,7 +587,7 @@ void button_event(int key, bool pressed)
587 if (queue_empty(&button_queue)) 587 if (queue_empty(&button_queue))
588 { 588 {
589 queue_post(&button_queue, BUTTON_REPEAT | btn, 0); 589 queue_post(&button_queue, BUTTON_REPEAT | btn, 0);
590#ifdef CONFIG_BACKLIGHT 590#if CONFIG_BACKLIGHT
591#ifdef HAVE_REMOTE_LCD 591#ifdef HAVE_REMOTE_LCD
592 if(btn & BUTTON_REMOTE) 592 if(btn & BUTTON_REMOTE)
593 { 593 {
@@ -604,7 +604,7 @@ void button_event(int key, bool pressed)
604 } 604 }
605 else 605 else
606 { 606 {
607#ifdef CONFIG_BACKLIGHT 607#if CONFIG_BACKLIGHT
608#ifdef HAVE_REMOTE_LCD 608#ifdef HAVE_REMOTE_LCD
609 if (btn & BUTTON_REMOTE) { 609 if (btn & BUTTON_REMOTE) {
610 if (!remote_filter_first_keypress || is_remote_backlight_on()) 610 if (!remote_filter_first_keypress || is_remote_backlight_on())
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c
index d6e9f90a7f..be908f20e5 100644
--- a/uisimulator/sdl/lcd-bitmap.c
+++ b/uisimulator/sdl/lcd-bitmap.c
@@ -25,7 +25,7 @@ SDL_Surface* lcd_surface;
25int lcd_backlight_val; 25int lcd_backlight_val;
26 26
27#if LCD_DEPTH <= 8 27#if LCD_DEPTH <= 8
28#ifdef CONFIG_BACKLIGHT 28#if CONFIG_BACKLIGHT
29SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; 29SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0};
30#endif 30#endif
31SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; 31SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0};
@@ -71,7 +71,7 @@ void lcd_update_rect(int x_start, int y_start, int width, int height)
71 LCD_HEIGHT, background ? UI_LCD_POSX : 0, background? UI_LCD_POSY : 0); 71 LCD_HEIGHT, background ? UI_LCD_POSX : 0, background? UI_LCD_POSY : 0);
72} 72}
73 73
74#ifdef CONFIG_BACKLIGHT 74#if CONFIG_BACKLIGHT
75void sim_backlight(int value) 75void sim_backlight(int value)
76{ 76{
77 lcd_backlight_val = value; 77 lcd_backlight_val = value;
@@ -118,7 +118,7 @@ void sim_lcd_init(void)
118#endif 118#endif
119 119
120#if LCD_DEPTH <= 8 120#if LCD_DEPTH <= 8
121#ifdef CONFIG_BACKLIGHT 121#if CONFIG_BACKLIGHT
122 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,
123 0, (1<<LCD_DEPTH)); 123 0, (1<<LCD_DEPTH));
124#else 124#else
@@ -134,7 +134,7 @@ void sim_lcd_ex_init(int shades, unsigned long (*getpixel)(int, int))
134 lcd_ex_shades = shades; 134 lcd_ex_shades = shades;
135 lcd_ex_getpixel = getpixel; 135 lcd_ex_getpixel = getpixel;
136 if (shades) { 136 if (shades) {
137#ifdef CONFIG_BACKLIGHT 137#if CONFIG_BACKLIGHT
138 if (lcd_backlight_val > 0) { 138 if (lcd_backlight_val > 0) {
139 sdl_set_gradient(lcd_surface, &lcd_color_max, 139 sdl_set_gradient(lcd_surface, &lcd_color_max,
140 &lcd_backlight_color_zero, (1<<LCD_DEPTH), 140 &lcd_backlight_color_zero, (1<<LCD_DEPTH),
diff --git a/uisimulator/sdl/lcd-charcell.c b/uisimulator/sdl/lcd-charcell.c
index 59ae39a248..cb31d6349b 100644
--- a/uisimulator/sdl/lcd-charcell.c
+++ b/uisimulator/sdl/lcd-charcell.c
@@ -114,7 +114,7 @@ void drawrectangles(int color, struct rectangle *points, int count)
114 SDL_UnlockSurface(lcd_surface); 114 SDL_UnlockSurface(lcd_surface);
115} 115}
116 116
117#ifdef CONFIG_BACKLIGHT 117#if CONFIG_BACKLIGHT
118void sim_backlight(int value) 118void sim_backlight(int value)
119{ 119{
120 if (value > 0) { 120 if (value > 0) {