summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTomas Salfischberger <tomas@rockbox.org>2005-06-25 17:34:05 +0000
committerTomas Salfischberger <tomas@rockbox.org>2005-06-25 17:34:05 +0000
commitaf50cae14d9b5b1883789034e4af94e4c25fed94 (patch)
tree81b8799c65452bf964466786800dcf7731553865 /apps
parentf08a4ca028aad391bcbedb62c9bd80968dc218d1 (diff)
downloadrockbox-af50cae14d9b5b1883789034e4af94e4c25fed94.tar.gz
rockbox-af50cae14d9b5b1883789034e4af94e4c25fed94.zip
Fixed bug: "Not clearing the buffer causes a problem when switching from one WPS to another if they don't use the same image set."
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6866 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/wps-display.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 2763299aad..8afb803856 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -219,6 +219,16 @@ bool wps_load(const char* file, bool display)
if (numread > 0)
{
+#ifdef HAVE_LCD_BITMAP
+ /* reset image buffer */
+ img_buf_ptr = img_buf;
+ img_buf_free = IMG_BUFSIZE;
+
+ /* set images to unloaded */
+ for (i = 0; i < MAX_IMAGES; i++) {
+ img[i].loaded = false;
+ }
+#endif
buffer[numread] = 0;
wps_format(buffer);
}