summaryrefslogtreecommitdiffstats
path: root/apps/buffering.c
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-05-04 15:46:41 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-05-04 15:46:41 +0000
commit20f76d61ae58bd47b647d79e40beebbbe747e480 (patch)
treed37569a127b02fdd051c6a3da77c70ac2d72e8ab /apps/buffering.c
parentdfb24d6ceee703361b8120d689d8d77cfc15830d (diff)
downloadrockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.tar.gz
rockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.tar.bz2
rockbox-20f76d61ae58bd47b647d79e40beebbbe747e480.zip
Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow
gets overlay support. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index 66bd22f12d..3bcd790c35 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -834,7 +834,6 @@ static bool fill_buffer(void)
static int load_image(int fd, const char *path)
{
int rc;
- int pathlen = strlen(path);
struct bitmap *bmp = (struct bitmap *)&buffer[buf_widx];
/* FIXME: alignment may be needed for the data buffer. */
bmp->data = &buffer[buf_widx + sizeof(struct bitmap)];
@@ -848,10 +847,13 @@ static int load_image(int fd, const char *path)
get_albumart_size(bmp);
+#ifdef HAVE_JPEG
+ int pathlen = strlen(path);
if (strcmp(path + pathlen - 4, ".bmp"))
rc = read_jpeg_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER|
FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL);
else
+#endif
rc = read_bmp_fd(fd, bmp, free, FORMAT_NATIVE|FORMAT_DITHER|
FORMAT_RESIZE|FORMAT_KEEP_ASPECT, NULL);
return rc + (rc > 0 ? sizeof(struct bitmap) : 0);