Check if backdrop available at wps load. Clear old backdrop pointer when the user has removed it while being in the menu. Fixes bug 5351
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9961 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b5ddf412ad
commit
965e824923
2 changed files with 16 additions and 2 deletions
|
@ -106,9 +106,16 @@ long gui_wps_show(void)
|
|||
}
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
gui_wps[SCREEN_MAIN].data->old_backdrop = lcd_get_backdrop();
|
||||
if (gui_wps[SCREEN_MAIN].data->has_backdrop) {
|
||||
if (gui_wps[SCREEN_MAIN].data->has_backdrop)
|
||||
{
|
||||
lcd_set_backdrop(&wps_backdrop[0][0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* wps has no backdrop, so clear it in case we're switching wps */
|
||||
lcd_set_backdrop(gui_wps[SCREEN_MAIN].data->old_backdrop);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -555,6 +562,9 @@ long gui_wps_show(void)
|
|||
if (main_menu())
|
||||
return true;
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
if(global_settings.backdrop_file[0] == 0)
|
||||
gui_wps[SCREEN_MAIN].data->old_backdrop = NULL;
|
||||
|
||||
if (gui_wps[SCREEN_MAIN].data->has_backdrop)
|
||||
lcd_set_backdrop(&wps_backdrop[0][0]);
|
||||
#endif
|
||||
|
|
|
@ -889,7 +889,11 @@ static bool dirbrowse(void)
|
|||
if (gui_wps_show() == SYS_USB_CONNECTED)
|
||||
reload_dir = true;
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
/* check if the backdrop hasn't been cleared */
|
||||
if(global_settings.backdrop_file[0])
|
||||
lcd_set_backdrop(old_backdrop);
|
||||
else
|
||||
lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
#ifdef HAVE_HOTSWAP
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue