diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-03 15:06:30 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-03 15:06:30 +0000 |
commit | 3b75c86d74937a6bffcb371bb08bdfb182db9d2b (patch) | |
tree | 3be12a89b7a5377a31a46b48e672e08af36ac949 /apps/menus/main_menu.c | |
parent | 0dc5cc8002e3d30fc7ae7ddf7f33a56c8b136e7e (diff) |
A bit mroe wps/skin engine cleanup so that the structs the wps uses can be static:
-add wrappers wps_data_load() and wps_data_init() so that other code doesn't need the structs for that
-change (and rename) gui_sync_wps_uses_albumart() to take points to be filled as parameter to get the AA size of a wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22139 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r-- | apps/menus/main_menu.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index b535662f13..781b6f488a 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -50,7 +50,7 @@ #endif #include "version.h" #include "time.h" -#include "skin_engine/skin_engine.h" +#include "wps.h" static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG}; @@ -253,17 +253,19 @@ static char* info_getname(int selected_item, void *data, break; #ifdef HAVE_ALBUMART case INFO_ALBUMART: /* album art dimenstions */ - if (gui_sync_wps_uses_albumart()) + { + int width = 0, height = 0; + if (wps_uses_albumart(&width, &height)) { snprintf(buffer, buffer_len, "%s %dx%d", str(LANG_ALBUMART), - gui_wps[0].data->albumart_max_width, - gui_wps[0].data->albumart_max_height); + width, height); } else { snprintf(buffer, buffer_len, "%s %s", str(LANG_ALBUMART), str(LANG_SET_BOOL_NO)); } + } break; #endif } return buffer; @@ -348,17 +350,20 @@ static int info_speak_item(int selected_item, void * data) break; #ifdef HAVE_ALBUMART case INFO_ALBUMART: /* album art dimenstions */ - if (gui_sync_wps_uses_albumart()) + { + int width = 0, height = 0; + if (wps_uses_albumart(&width, &height)) { talk_id(LANG_ALBUMART, false); - talk_value(gui_wps[0].data->albumart_max_width, UNIT_PIXEL, true); - talk_value(gui_wps[0].data->albumart_max_height, UNIT_PIXEL, true); + talk_value(width, UNIT_PIXEL, true); + talk_value(height, UNIT_PIXEL, true); } else { talk_id(LANG_ALBUMART, false); talk_id(LANG_SET_BOOL_NO, true); } + } break; #endif } return 0; |