summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-26 18:17:47 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-26 18:17:47 +0000
commitecdadcbaed5bddbd3693af5fc7bc8f2dccd8c3ff (patch)
tree366c18d19ad344aee09b129d7d800219cff5b1a0
parent7ac7317038fbfc8a2ed86b8a68f933897b94fd33 (diff)
downloadrockbox-ecdadcbaed5bddbd3693af5fc7bc8f2dccd8c3ff.tar.gz
rockbox-ecdadcbaed5bddbd3693af5fc7bc8f2dccd8c3ff.zip
Significantly reduce memory waste by reducing the wps image buffer. The new size still allows to cover the whole screen once with native bitmaps, plus twice with mono bitmaps, not counting the backdrop. Regains ~33KB on archos and ~220KB on H300. It's still a waste on dual-LCD targets because the two buffers are equal in size, despite one LCD being of much lower resolution + colour depth.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8849 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 3277037bfa..5c3b72603c 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -301,7 +301,8 @@ struct align_pos {
#ifdef HAVE_LCD_BITMAP
#define MAX_IMAGES (26*2) /* a-z and A-Z */
-#define IMG_BUFSIZE (LCD_HEIGHT * LCD_WIDTH * MAX_IMAGES/10)
+#define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \
+ + (2*LCD_HEIGHT*LCD_WIDTH/8))
#define WPS_MAX_LINES (LCD_HEIGHT/5+1)
#define FORMAT_BUFFER_SIZE 3072
#else