From b5f4d90b4b4e88f83828681c7d708338fdcee8d0 Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Tue, 5 Jun 2007 10:42:41 +0000 Subject: Make the bitmap loading code handle the progressbar and backdrop bitmaps in a slightly more generic way. This hopefully simplifies the code a bit and should make adding special bitmaps less painful. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13560 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/gui/gwps.h') diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index 26a800cbbd..609e2af91f 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h @@ -69,6 +69,13 @@ struct align_pos { #ifdef HAVE_LCD_BITMAP #define MAX_IMAGES (26*2) /* a-z and A-Z */ + +#if LCD_DEPTH > 1 +#define MAX_BITMAPS MAX_IMAGES+2 /* WPS images + pbar bitmap + backdrop */ +#else +#define MAX_BITMAPS MAX_IMAGES+1 /* WPS images + pbar bitmap */ +#endif + #define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ + (2*LCD_HEIGHT*LCD_WIDTH/8)) -- cgit v1.2.3