summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-06 00:14:40 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-06 00:14:40 +0000
commit4764ee04c9c6432ad3cada25a8e87be056815815 (patch)
tree490154e71180349bb1991bd04445ddc0287a5db3 /apps/gui/skin_engine
parent4632fc0682cfc3e2490435d616c7fa0b48088125 (diff)
downloadrockbox-4764ee04c9c6432ad3cada25a8e87be056815815.tar.gz
rockbox-4764ee04c9c6432ad3cada25a8e87be056815815.zip
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
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/wps_display.c9
-rw-r--r--apps/gui/skin_engine/wps_parser.c19
2 files changed, 5 insertions, 23 deletions
diff --git a/apps/gui/skin_engine/wps_display.c b/apps/gui/skin_engine/wps_display.c
index 98050093c4..6a94c6a946 100644
--- a/apps/gui/skin_engine/wps_display.c
+++ b/apps/gui/skin_engine/wps_display.c
@@ -82,14 +82,7 @@ bool gui_wps_display(struct gui_wps *gwps)
82 } 82 }
83#endif 83#endif
84 display->clear_display(); 84 display->clear_display();
85#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 85 display->backdrop_show(BACKDROP_SKIN_WPS);
86 if (display->screen_type == SCREEN_REMOTE)
87 show_remote_wps_backdrop();
88 else if (display->screen_type == SCREEN_MAIN)
89#endif
90#if LCD_DEPTH > 1
91 show_wps_backdrop();
92#endif
93 return gui_wps_redraw(gwps, WPS_REFRESH_ALL); 86 return gui_wps_redraw(gwps, WPS_REFRESH_ALL);
94} 87}
95 88
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)
1635#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) 1635#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1636 if (bmp_names[BACKDROP_BMP]) 1636 if (bmp_names[BACKDROP_BMP])
1637 { 1637 {
1638 int screen = SCREEN_MAIN;
1638 get_image_filename(bmp_names[BACKDROP_BMP], bmpdir, 1639 get_image_filename(bmp_names[BACKDROP_BMP], bmpdir,
1639 img_path, sizeof(img_path)); 1640 img_path, sizeof(img_path));
1640
1641#if defined(HAVE_REMOTE_LCD) 1641#if defined(HAVE_REMOTE_LCD)
1642 /* We only need to check LCD type if there is a remote LCD */ 1642 /* We only need to check LCD type if there is a remote LCD */
1643 if (!wps_data->remote_wps) 1643 if (wps_data->remote_wps)
1644#endif 1644 screen = SCREEN_REMOTE;
1645 {
1646 /* Load backdrop for the main LCD */
1647 if (!load_wps_backdrop(img_path))
1648 return false;
1649 }
1650#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
1651 else
1652 {
1653 /* Load backdrop for the remote LCD */
1654 if (!load_remote_wps_backdrop(img_path))
1655 return false;
1656 }
1657#endif 1645#endif
1646 screens[screen].backdrop_load(BACKDROP_SKIN_WPS, img_path);
1658 } 1647 }
1659#endif /* has backdrop support */ 1648#endif /* has backdrop support */
1660 1649