From 4764ee04c9c6432ad3cada25a8e87be056815815 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 6 Aug 2009 00:14:40 +0000 Subject: 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 --- apps/gui/skin_engine/wps_parser.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'apps/gui/skin_engine/wps_parser.c') diff --git a/apps/gui/skin_engine/wps_parser.c b/apps/gui/skin_engine/wps_parser.c index 1a903c98ec..c37cd786ec 100644 --- a/apps/gui/skin_engine/wps_parser.c +++ b/apps/gui/skin_engine/wps_parser.c @@ -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 */ -- cgit v1.2.3