From a384fb6d8a81f8056189f19b748d2fdf6702b066 Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Sun, 11 Nov 2007 13:15:36 +0000 Subject: Fix red on the iFP. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15575 a1c6a512-1295-4272-9138-f99709370657 --- apps/buffering.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/buffering.c') diff --git a/apps/buffering.c b/apps/buffering.c index 3a412680ea..91b3995253 100644 --- a/apps/buffering.c +++ b/apps/buffering.c @@ -819,7 +819,7 @@ static bool fill_buffer(void) } } -#ifdef HAVE_LCD_BITMAP +#ifdef HAVE_ALBUMART /* Given a file descriptor to a bitmap file, write the bitmap data to the buffer, with a struct bitmap and the actual data immediately following. Return value is the total size (struct + data). */ @@ -829,7 +829,11 @@ static int load_bitmap(const int fd) 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)]; + +#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) bmp->maskdata = NULL; +#endif + int free = (int)MIN(buffer_len - BUF_USED, buffer_len - buf_widx); rc = read_bmp_fd(fd, bmp, free, FORMAT_ANY|FORMAT_DITHER); return rc + (rc > 0 ? sizeof(struct bitmap) : 0); -- cgit v1.2.3