summaryrefslogtreecommitdiff
path: root/apps/gui/wps.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-16 19:14:41 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-16 19:14:41 +0000
commite9c10189e93fe53cff74ae8fa15d19b1c522d5e4 (patch)
treee3c39a41ff160194dfd9ce617893e0367a6fdcc8 /apps/gui/wps.c
parenta72ffe7bb533302dbf4e6c7c4f1e4bd4078d3ed6 (diff)
downloadrockbox-e9c10189e93fe53cff74ae8fa15d19b1c522d5e4.tar.gz
rockbox-e9c10189e93fe53cff74ae8fa15d19b1c522d5e4.zip
Rework albumart buffering internally to allow for mutliple albumart sizes.
Playback now has a few albumart slots. Anything (most importantly: skins) can obtain such a slot. The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size. Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r--apps/gui/wps.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index d4a2893ff2..342ebdea2b 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -1278,6 +1278,7 @@ static void statusbar_toggle_handler(void *data)
1278} 1278}
1279#endif 1279#endif
1280 1280
1281
1281void gui_sync_wps_init(void) 1282void gui_sync_wps_init(void)
1282{ 1283{
1283 int i; 1284 int i;
@@ -1285,6 +1286,7 @@ void gui_sync_wps_init(void)
1285 { 1286 {
1286#ifdef HAVE_ALBUMART 1287#ifdef HAVE_ALBUMART
1287 wps_datas[i].albumart = NULL; 1288 wps_datas[i].albumart = NULL;
1289 wps_datas[i].playback_aa_slot = -1;
1288#endif 1290#endif
1289#ifdef HAVE_REMOTE_LCD 1291#ifdef HAVE_REMOTE_LCD
1290 wps_datas[i].remote_wps = (i == SCREEN_REMOTE); 1292 wps_datas[i].remote_wps = (i == SCREEN_REMOTE);
@@ -1304,26 +1306,6 @@ void gui_sync_wps_init(void)
1304#endif 1306#endif
1305} 1307}
1306 1308
1307#ifdef HAVE_ALBUMART
1308bool wps_uses_albumart(int *width, int *height)
1309{
1310 int i;
1311 FOR_NB_SCREENS(i) {
1312 struct gui_wps *gwps = &gui_wps[i];
1313 struct skin_albumart *aa = gwps->data->albumart;
1314 if (aa && (aa->state != WPS_ALBUMART_NONE))
1315 {
1316 if (width)
1317 *width = aa->width;
1318 if (height)
1319 *height = aa->height;
1320 return true;
1321 }
1322 }
1323 return false;
1324}
1325#endif
1326
1327 1309
1328#ifdef IPOD_ACCESSORY_PROTOCOL 1310#ifdef IPOD_ACCESSORY_PROTOCOL
1329int wps_get_ff_rewind_count(void) 1311int wps_get_ff_rewind_count(void)