mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
Add backdrop functions to the multiscreen api and add a enum backdrop_type parameter for different backdrops (main, wps), symplifying calls and removing dozens of #ifdefs (stubs added for non-backdrop displays that can't do backdrops).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22176 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4632fc0682
commit
4764ee04c9
13 changed files with 185 additions and 144 deletions
|
|
@ -82,14 +82,7 @@ bool gui_wps_display(struct gui_wps *gwps)
|
|||
}
|
||||
#endif
|
||||
display->clear_display();
|
||||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||
if (display->screen_type == SCREEN_REMOTE)
|
||||
show_remote_wps_backdrop();
|
||||
else if (display->screen_type == SCREEN_MAIN)
|
||||
#endif
|
||||
#if LCD_DEPTH > 1
|
||||
show_wps_backdrop();
|
||||
#endif
|
||||
display->backdrop_show(BACKDROP_SKIN_WPS);
|
||||
return gui_wps_redraw(gwps, WPS_REFRESH_ALL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1635,26 +1635,15 @@ static bool load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
|
|||
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
|
||||
if (bmp_names[BACKDROP_BMP])
|
||||
{
|
||||
int screen = SCREEN_MAIN;
|
||||
get_image_filename(bmp_names[BACKDROP_BMP], bmpdir,
|
||||
img_path, sizeof(img_path));
|
||||
|
||||
#if defined(HAVE_REMOTE_LCD)
|
||||
/* We only need to check LCD type if there is a remote LCD */
|
||||
if (!wps_data->remote_wps)
|
||||
#endif
|
||||
{
|
||||
/* Load backdrop for the main LCD */
|
||||
if (!load_wps_backdrop(img_path))
|
||||
return false;
|
||||
}
|
||||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||
else
|
||||
{
|
||||
/* Load backdrop for the remote LCD */
|
||||
if (!load_remote_wps_backdrop(img_path))
|
||||
return false;
|
||||
}
|
||||
if (wps_data->remote_wps)
|
||||
screen = SCREEN_REMOTE;
|
||||
#endif
|
||||
screens[screen].backdrop_load(BACKDROP_SKIN_WPS, img_path);
|
||||
}
|
||||
#endif /* has backdrop support */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue