From 1a9442c0018ec92e0250246dc0112fed0e89bd55 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Wed, 15 Nov 2006 06:46:35 +0000 Subject: [PATCH] Hopefully clean up some errors git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11528 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 2 ++ apps/plugin.h | 2 ++ apps/plugins/bounce.c | 2 ++ apps/plugins/brickmania.c | 3 +++ apps/plugins/bubbles.c | 2 ++ apps/plugins/chessbox/chessbox.c | 2 ++ apps/plugins/demystify.c | 2 ++ apps/plugins/fire.c | 2 ++ apps/plugins/flipit.c | 2 ++ apps/plugins/jewels.c | 2 ++ apps/plugins/mandelbrot.c | 2 ++ apps/plugins/minesweeper.c | 2 ++ apps/plugins/plasma.c | 2 ++ apps/plugins/rockblox.c | 2 ++ apps/plugins/rockboy/rockboy.c | 6 ------ apps/plugins/snake2.c | 2 ++ apps/plugins/spacerocks.c | 2 ++ apps/plugins/sudoku/sudoku.c | 4 +++- apps/plugins/wormlet.c | 2 ++ 19 files changed, 38 insertions(+), 7 deletions(-) diff --git a/apps/plugin.c b/apps/plugin.c index c6481e8eae..90b3837cf8 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -467,7 +467,9 @@ static const struct plugin_api rockbox_api = { #endif /* HAVE_RECORDING */ #endif /* CONFIG_CODEC == SWCODEC */ +#if LCD_DEPTH > 1 lcd_set_backdrop, +#endif }; diff --git a/apps/plugin.h b/apps/plugin.h index 2fcd52198c..e9a6cfdaed 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -579,7 +579,9 @@ struct plugin_api { #endif /* HAVE_RECORDING */ #endif /* CONFIG_CODEC == SWCODEC */ +#if LCD_DEPTH > 1 void (*lcd_set_backdrop)(fb_data* backdrop); +#endif }; /* plugin header */ diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index e3e90468cc..89a6745720 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -480,7 +480,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; len = rb->strlen(SS_TITLE); +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_getstringsize((unsigned char *)SS_TITLE, &w, &h); diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 4eb366dc6e..5bcecce33b 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -1943,6 +1943,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; rb->lcd_setfont(FONT_SYSFIXED); +#if LCD_DEPTH > 1 + rb->lcd_set_backdrop(NULL); +#endif /* Permanently enable the backlight (unless the user has turned it off) */ if (rb->global_settings->backlight_timeout > 0) rb->backlight_set_timeout(1); diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 4a3f1c6962..9ce6ee80c5 100755 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -2699,7 +2699,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { rb->lcd_clear_display(); /* start app */ +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif rb->lcd_setfont(FONT_SYSFIXED); while(!exit) { diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index d82ac9e181..3a69fc999a 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -643,7 +643,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { /* plugin init */ (void)parameter; rb = api; +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif /* end of plugin init */ /* load opening book, soon */ diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c index 36e41a2a73..d29f6c3b14 100644 --- a/apps/plugins/demystify.c +++ b/apps/plugins/demystify.c @@ -445,7 +445,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) int ret; rb = api; /* copy to global api pointer */ +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif (void)parameter; if (rb->global_settings->backlight_timeout > 0) { diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c index 6f20609e62..d03afa2aef 100644 --- a/apps/plugins/fire.c +++ b/apps/plugins/fire.c @@ -409,7 +409,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; // copy to global api pointer (void)parameter; +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif if (rb->global_settings->backlight_timeout > 0) rb->backlight_set_timeout(1);/* keep the light on */ diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index b44a54d1da..0dd2fa5143 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -469,7 +469,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_foreground(LCD_BLACK); #endif +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif rb->splash(HZ, true, "FlipIt!"); diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 1982d77db1..46a97f8d07 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -1562,7 +1562,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { jewels_loadscores(&bj); rb->lcd_setfont(FONT_SYSFIXED); +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif jewels_setcolors(); while(!exit) { diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index 7e6c4f3d48..69c0fca98b 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c @@ -546,7 +546,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) xlcd_init(rb); #endif +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif init_mandelbrot_set(); diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 143908e040..4859e4772f 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -657,7 +657,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) (void)parameter; rb = api; +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif while( !exit ) { diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index 927b290e12..ff410528d4 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c @@ -348,7 +348,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; /* copy to global api pointer */ (void)parameter; +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif if (rb->global_settings->backlight_timeout > 0) rb->backlight_set_timeout(1);/* keep the light on */ diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 34754bfd78..6337ff4acb 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -910,7 +910,9 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter) rb = api; rb->srand (*rb->current_tick); +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif #ifdef HAVE_LCD_BITMAP rb->lcd_setfont (FONT_SYSFIXED); diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 5ef47b5813..f82b0c283a 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c @@ -170,12 +170,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_setfont(0); - rb->lcd_set_backdrop(NULL); -#if defined(HAVE_LCD_COLOR) - rb->lcd_set_foreground(LCD_WHITE); - rb->lcd_set_background(LCD_BLACK); -#endif - rb->lcd_clear_display(); if (!parameter) diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 39ffec2dda..233dcf7185 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -1326,7 +1326,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* Lets use the default font */ rb->lcd_setfont(FONT_SYSFIXED); +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif #ifdef HAVE_LCD_COLOR rb->lcd_set_foreground(LCD_BLACK); rb->lcd_set_background(LCD_WHITE); diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index c1daa94fa5..231772f76d 100755 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -1675,7 +1675,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) game_state = ATTRACT_MODE; /* universal font */ +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif rb->lcd_setfont(FONT_SYSFIXED); rb->backlight_set_timeout(1); iohiscore(); diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index d280688a8d..5d319e262c 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -1125,8 +1125,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* plugin init */ rb = api; /* end of plugin init */ - + +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif clear_state(&state); diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 3d3cd4f25c..1ca570d24a 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -2355,7 +2355,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_background(COLOR_BG); #endif +#if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); +#endif #ifdef DEBUG_WORMLET testline_in_rect();