Don't need to remove the backdrop for all plugins - leave it up for some.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11526 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9b0ef15c0d
commit
d6b0c97312
29 changed files with 39 additions and 33 deletions
|
@ -466,6 +466,9 @@ static const struct plugin_api rockbox_api = {
|
|||
#endif
|
||||
#endif /* HAVE_RECORDING */
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
lcd_set_backdrop,
|
||||
|
||||
};
|
||||
|
||||
int plugin_load(const char* plugin, void* parameter)
|
||||
|
@ -485,6 +488,7 @@ int plugin_load(const char* plugin, void* parameter)
|
|||
#ifdef HAVE_REMOTE_LCD
|
||||
int rxm, rym;
|
||||
#endif
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
fb_data* old_backdrop;
|
||||
#endif
|
||||
|
@ -567,10 +571,11 @@ int plugin_load(const char* plugin, void* parameter)
|
|||
xm = lcd_getxmargin();
|
||||
ym = lcd_getymargin();
|
||||
lcd_setmargins(0,0);
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
old_backdrop = lcd_get_backdrop();
|
||||
lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
|
||||
lcd_clear_display();
|
||||
lcd_update();
|
||||
#else /* !HAVE_LCD_BITMAP */
|
||||
|
|
|
@ -578,6 +578,8 @@ struct plugin_api {
|
|||
#endif
|
||||
#endif /* HAVE_RECORDING */
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
void (*lcd_set_backdrop)(fb_data* backdrop);
|
||||
};
|
||||
|
||||
/* plugin header */
|
||||
|
|
|
@ -480,6 +480,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb = api;
|
||||
|
||||
len = rb->strlen(SS_TITLE);
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
rb->lcd_getstringsize((unsigned char *)SS_TITLE, &w, &h);
|
||||
|
||||
|
|
|
@ -2699,6 +2699,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
|
|||
rb->lcd_clear_display();
|
||||
|
||||
/* start app */
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
|
||||
while(!exit) {
|
||||
|
|
|
@ -643,6 +643,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
|
|||
/* plugin init */
|
||||
(void)parameter;
|
||||
rb = api;
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
/* end of plugin init */
|
||||
|
||||
/* load opening book, soon */
|
||||
|
|
|
@ -3101,11 +3101,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
draw_extras(year, day, month, temphour, minute, second);
|
||||
|
||||
#if (CONFIG_KEYPAD == IPOD_4G_PAD)
|
||||
rb->lcd_drawline (113, 0, 113, 65);
|
||||
rb->lcd_drawline (0, 65, 113, 65);
|
||||
#endif
|
||||
|
||||
if(!idle_poweroff)
|
||||
rb->reset_poweroff_timer();
|
||||
|
||||
|
|
|
@ -558,6 +558,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
xlcd_init(rb);
|
||||
#elif defined(USE_GSLIB)
|
||||
gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size);
|
||||
|
|
|
@ -445,6 +445,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
int ret;
|
||||
|
||||
rb = api; /* copy to global api pointer */
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
(void)parameter;
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
{
|
||||
|
|
|
@ -849,6 +849,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb->profile_thread();
|
||||
#endif
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
D_DoomMain ();
|
||||
|
||||
#ifdef RB_PROFILE
|
||||
|
|
|
@ -409,6 +409,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
rb = api; // copy to global api pointer
|
||||
(void)parameter;
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
rb->backlight_set_timeout(1);/* keep the light on */
|
||||
|
||||
|
|
|
@ -469,6 +469,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb->lcd_set_foreground(LCD_BLACK);
|
||||
#endif
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
rb->splash(HZ, true, "FlipIt!");
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
|
|
@ -1562,6 +1562,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
|
|||
jewels_loadscores(&bj);
|
||||
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
jewels_setcolors();
|
||||
|
||||
while(!exit) {
|
||||
|
|
|
@ -546,6 +546,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
xlcd_init(rb);
|
||||
#endif
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
init_mandelbrot_set();
|
||||
|
||||
/* main loop */
|
||||
|
|
|
@ -657,6 +657,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
(void)parameter;
|
||||
rb = api;
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
while( !exit )
|
||||
{
|
||||
|
|
|
@ -575,6 +575,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_foreground(GRAPH_COLOR);
|
||||
rb->lcd_set_background(BACKG_COLOR);
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_clear_display();
|
||||
rb->lcd_update();
|
||||
#endif
|
||||
|
|
|
@ -389,7 +389,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
rb->cpu_boost(true);
|
||||
#endif
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_set_foreground(LCD_WHITE);
|
||||
rb->lcd_set_background(LCD_BLACK);
|
||||
rb->lcd_clear_display();
|
||||
|
|
|
@ -348,6 +348,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
rb = api; /* copy to global api pointer */
|
||||
(void)parameter;
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
rb->backlight_set_timeout(1);/* keep the light on */
|
||||
|
||||
|
|
|
@ -910,6 +910,7 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter)
|
|||
rb = api;
|
||||
|
||||
rb->srand (*rb->current_tick);
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
rb->lcd_setfont (FONT_SYSFIXED);
|
||||
|
|
|
@ -170,6 +170,7 @@ 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);
|
||||
|
|
|
@ -2941,6 +2941,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb = api;
|
||||
|
||||
rb->lcd_set_foreground(COLOR_WHITE);
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_fillrect(0,0,LCD_WIDTH,LCD_HEIGHT);
|
||||
rb->splash( HZ/2, true, "Rock Paint");
|
||||
|
||||
|
|
|
@ -1134,7 +1134,7 @@ void game (void)
|
|||
|
||||
draw_apple();
|
||||
|
||||
rb->sleep(HZ/speed);
|
||||
rb->sleep(HZ/speed); /* Make snake more addaptive for frequency shifts */
|
||||
|
||||
button = rb->button_get(false);
|
||||
|
||||
|
@ -1326,7 +1326,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
/* Lets use the default font */
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
rb->lcd_set_foreground(LCD_BLACK);
|
||||
rb->lcd_set_background(LCD_WHITE);
|
||||
|
|
|
@ -362,17 +362,11 @@ static void draw_card_ext( int x, int y, bool selected, bool cursor )
|
|||
|
||||
if( selected )
|
||||
{
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_foreground( FRAME_COLOR );
|
||||
#endif
|
||||
rb->lcd_drawrect( x+1, y+1, CARD_WIDTH-2, CARD_HEIGHT-2 );
|
||||
#ifdef LARGE_CARD
|
||||
rb->lcd_drawrect( x+2, y+2, CARD_WIDTH-4, CARD_HEIGHT-4 );
|
||||
#endif
|
||||
}
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_foreground( LCD_BLACK );
|
||||
#endif
|
||||
|
||||
if( cursor )
|
||||
{
|
||||
|
@ -575,11 +569,6 @@ int solitaire_menu(bool in_game)
|
|||
|
||||
struct menu_item items[5];
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_background(LCD_DEFAULT_BG);
|
||||
rb->lcd_set_foreground(LCD_DEFAULT_FG);
|
||||
#endif
|
||||
|
||||
if (in_game)
|
||||
{
|
||||
items[i++].desc = "Resume Game";
|
||||
|
@ -1098,15 +1087,8 @@ int solitaire( void )
|
|||
|
||||
while( true )
|
||||
{
|
||||
#if LCD_DEPTH>1
|
||||
rb->lcd_set_background(BACKGROUND_COLOR);
|
||||
#endif
|
||||
rb->lcd_clear_display();
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_foreground(LCD_BLACK);
|
||||
#endif
|
||||
|
||||
/* get the biggest column length so that display can be "optimized" */
|
||||
biggest_col_length = 0;
|
||||
|
||||
|
|
|
@ -1675,6 +1675,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
game_state = ATTRACT_MODE;
|
||||
|
||||
/* universal font */
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
rb->backlight_set_timeout(1);
|
||||
iohiscore();
|
||||
|
|
|
@ -1115,6 +1115,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb->lcd_getstringsize("a", &char_width, &char_height);
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->lcd_set_background( LCD_BLACK );
|
||||
rb->lcd_set_foreground( LCD_WHITE );
|
||||
#endif
|
||||
|
|
|
@ -223,11 +223,6 @@ int plugin_main(void)
|
|||
starfield_init(&starfield);
|
||||
starfield_add_stars(&starfield, INIT_STARS);
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
rb->lcd_set_background(LCD_BLACK);
|
||||
rb->lcd_set_foreground(LCD_WHITE);
|
||||
#endif
|
||||
|
||||
while (true)
|
||||
{
|
||||
rb->sleep(1);
|
||||
|
|
|
@ -1126,6 +1126,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb = api;
|
||||
/* end of plugin init */
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
clear_state(&state);
|
||||
|
||||
if (parameter==NULL) {
|
||||
|
|
|
@ -2355,6 +2355,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
rb->lcd_set_background(COLOR_BG);
|
||||
#endif
|
||||
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
#ifdef DEBUG_WORMLET
|
||||
testline_in_rect();
|
||||
test_worm_argh_collision_in_moves();
|
||||
|
|
|
@ -861,6 +861,7 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter)
|
|||
rb = api;
|
||||
|
||||
rb->lcd_setfont (FONT_SYSFIXED);
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
|
||||
/* Permanently enable the backlight (unless the user has turned it off) */
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
|
|
|
@ -72,6 +72,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
#if CODEC == SWCODEC && !defined SIMULATOR
|
||||
rb->pcm_play_stop();
|
||||
#endif
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
rb->splash(HZ, true, "Welcome to ZXBox");
|
||||
|
||||
#ifdef USE_IRAM
|
||||
|
|
Loading…
Reference in a new issue