summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-12-13 23:20:42 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-01-09 09:11:29 -0500
commit3adeae2026d016ab608b19e3e6e1c5a8a05b99be (patch)
treea4142db6f37542cbdc817beae2b5c2f6793fa6b7
parentf1ddd6f0147d5bf165b0fd78bfc41af8167e0ec9 (diff)
downloadrockbox-3adeae2026d016ab608b19e3e6e1c5a8a05b99be.tar.gz
rockbox-3adeae2026d016ab608b19e3e6e1c5a8a05b99be.zip
ImageViewer: Fix crash when zooming on grayscale devices
lcd_update was called while the grayscale overlay was running regression, apparently introduced by 0ceaff2 (only reproducible on target, not in Simulator) Change-Id: Ife0ef359e19a03a6dc033070a11ae5843ee555e6
-rw-r--r--apps/plugins/imageviewer/imageviewer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c
index 508cf1a5b5..a2b3bb680a 100644
--- a/apps/plugins/imageviewer/imageviewer.c
+++ b/apps/plugins/imageviewer/imageviewer.c
@@ -968,11 +968,13 @@ static int load_and_show(char* filename, struct image_info *info)
break;
}
+#ifdef USEGSLIB
+ grey_show(false); /* switch off overlay */
+#endif
rb->lcd_clear_display();
}
while (status > PLUGIN_OTHER);
#ifdef USEGSLIB
- grey_show(false); /* switch off overlay */
rb->lcd_update();
#endif
return status;