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/recorder | |
| parent | 0dc5cc8002e3d30fc7ae7ddf7f33a56c8b136e7e (diff) | |
| download | rockbox-3b75c86d74937a6bffcb371bb08bdfb182db9d2b.zip rockbox-3b75c86d74937a6bffcb371bb08bdfb182db9d2b.tar.gz rockbox-3b75c86d74937a6bffcb371bb08bdfb182db9d2b.tar.bz2 rockbox-3b75c86d74937a6bffcb371bb08bdfb182db9d2b.tar.xz | |
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/recorder')
| -rw-r--r-- | apps/recorder/albumart.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index f1315da..4507923 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c @@ -28,6 +28,7 @@ #include "dircache.h" #include "misc.h" #include "settings.h" +#include "wps.h" /* Define LOGF_ENABLE to enable logf output in this file */ /*#define LOGF_ENABLE*/ @@ -279,16 +280,16 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen) return false; char size_string[9]; - struct wps_data *data = gui_wps[0].data; + int width = 0, height = 0; - if (!data) + if (!wps_uses_albumart(&width, &height)) return false; logf("Looking for album art for %s", id3->path); /* Write the size string, e.g. ".100x100". */ snprintf(size_string, sizeof(size_string), ".%dx%d", - data->albumart_max_width, data->albumart_max_height); + width, height); /* First we look for a bitmap of the right size */ if (search_albumart_files(id3, size_string, buf, buflen)) @@ -372,9 +373,14 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear) void get_albumart_size(struct bitmap *bmp) { /* FIXME: What should we do with albumart on remote? */ - struct wps_data *data = gui_wps[0].data; + int width, height; - bmp->width = data->albumart_max_width; - bmp->height = data->albumart_max_height; + if (!wps_uses_albumart(&width, &height)) + { + width = 0; height = 0; + } + + bmp->width = width; + bmp->height = height; } #endif /* PLUGIN */ |