diff options
author | Franklin Wei <frankhwei536@gmail.com> | 2014-09-14 19:48:20 -0400 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2014-09-15 01:49:00 +0200 |
commit | 3c33c6c2b660d9740684f78f132b464338cc8d76 (patch) | |
tree | 38e9064b04d6a049a9f1eb579d98ca2f6db38939 | |
parent | b655912e29ae919d85a3106511dceb4d509f21e8 (diff) | |
download | rockbox-3c33c6c2b660d9740684f78f132b464338cc8d76.tar.gz rockbox-3c33c6c2b660d9740684f78f132b464338cc8d76.zip |
hopefully fix the warnings
Change-Id: Id822234afc8906bb7c023810e902e604451ddfda
Reviewed-on: http://gerrit.rockbox.org/963
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
-rw-r--r-- | apps/plugins/periodic_table.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/periodic_table.c b/apps/plugins/periodic_table.c index e6b3b14f43..876de66615 100644 --- a/apps/plugins/periodic_table.c +++ b/apps/plugins/periodic_table.c | |||
@@ -200,6 +200,7 @@ static const long int periodic_tinyfont_bitmaps[] = { | |||
200 | 0x00052500, 0x00055360, 0x00072700, 0x00162100, 0x00222220, 0x00432400, 0x00630000, 0x00525250 | 200 | 0x00052500, 0x00055360, 0x00072700, 0x00162100, 0x00222220, 0x00432400, 0x00630000, 0x00525250 |
201 | }; | 201 | }; |
202 | 202 | ||
203 | #if LCD_DEPTH > 1 | ||
203 | static void periodic_tinyfont_draw_char(int x, int y, char ch) | 204 | static void periodic_tinyfont_draw_char(int x, int y, char ch) |
204 | { | 205 | { |
205 | int i,j; | 206 | int i,j; |
@@ -233,6 +234,7 @@ static void periodic_tinyfont_draw_string(int x, int y, char * s) | |||
233 | t++; | 234 | t++; |
234 | } | 235 | } |
235 | } | 236 | } |
237 | #endif | ||
236 | 238 | ||
237 | /* | 239 | /* |
238 | void periodic_tinyfont_draw_chart(int x, int y, ttk_color col) | 240 | void periodic_tinyfont_draw_chart(int x, int y, ttk_color col) |
@@ -269,13 +271,13 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | |||
269 | 271 | ||
270 | 272 | ||
271 | /* - - - SOME CONSTANTS - - - */ | 273 | /* - - - SOME CONSTANTS - - - */ |
272 | #ifdef HAVE_LCD_COLOR | 274 | #if LCD_DEPTH > 1 |
273 | #define PERIODIC_COLOR_BLACK LCD_RGBPACK(0,0,0) | 275 | #define PERIODIC_COLOR_BLACK LCD_RGBPACK(0,0,0) |
274 | #elif LCD_DEPTH > 1 | 276 | #elif LCD_DEPTH > 1 |
275 | #define PERIODIC_COLOR_BLACK LCD_BLACK | 277 | #define PERIODIC_COLOR_BLACK LCD_BLACK |
276 | #endif | 278 | #endif |
277 | 279 | ||
278 | #ifdef HAVE_LCD_COLOR | 280 | #if LCD_DEPTH > 1 |
279 | #define PERIODIC_COLOR_WHITE LCD_RGBPACK(255,255,255) | 281 | #define PERIODIC_COLOR_WHITE LCD_RGBPACK(255,255,255) |
280 | #elif LCD_DEPTH > 1 | 282 | #elif LCD_DEPTH > 1 |
281 | #define PERIODIC_COLOR_WHITE LCD_WHITE | 283 | #define PERIODIC_COLOR_WHITE LCD_WHITE |
@@ -291,7 +293,7 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | |||
291 | 293 | ||
292 | static void periodic_makecols(void) | 294 | static void periodic_makecols(void) |
293 | { | 295 | { |
294 | #ifdef HAVE_LCD_COLOR | 296 | #if LCD_DEPTH > 1 |
295 | int i = 0; | 297 | int i = 0; |
296 | 298 | ||
297 | periodic_color_palette[i++] = LCD_RGBPACK(255,255,255); /* 0 hydrogen */ | 299 | periodic_color_palette[i++] = LCD_RGBPACK(255,255,255); /* 0 hydrogen */ |
@@ -477,7 +479,7 @@ static void periodic_draw(void) | |||
477 | struct periodic_element_t e; | 479 | struct periodic_element_t e; |
478 | e = periodic_elements[periodic_sel]; | 480 | e = periodic_elements[periodic_sel]; |
479 | 481 | ||
480 | #ifdef HAVE_LCD_COLOR | 482 | #if LCD_DEPTH > 1 |
481 | rb->lcd_set_foreground(theme_fg); | 483 | rb->lcd_set_foreground(theme_fg); |
482 | #endif | 484 | #endif |
483 | 485 | ||
@@ -605,7 +607,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
605 | periodic_sel = 0; | 607 | periodic_sel = 0; |
606 | periodic_makecols(); | 608 | periodic_makecols(); |
607 | 609 | ||
608 | #ifdef HAVE_LCD_COLOR | 610 | #if LCD_DEPTH > 1 |
609 | theme_fg=rb->lcd_get_foreground(); | 611 | theme_fg=rb->lcd_get_foreground(); |
610 | theme_bg=rb->lcd_get_background(); | 612 | theme_bg=rb->lcd_get_background(); |
611 | #endif | 613 | #endif |
@@ -614,7 +616,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
614 | font_height = pf->height; | 616 | font_height = pf->height; |
615 | 617 | ||
616 | while (1) { | 618 | while (1) { |
617 | #ifdef HAVE_LCD_COLOR | 619 | #if LCD_DEPTH > 1 |
618 | rb->lcd_set_background(theme_bg); | 620 | rb->lcd_set_background(theme_bg); |
619 | #endif | 621 | #endif |
620 | rb->lcd_clear_display(); | 622 | rb->lcd_clear_display(); |