summaryrefslogtreecommitdiff
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)
968 break; 968 break;
969 } 969 }
970 970
971#ifdef USEGSLIB
972 grey_show(false); /* switch off overlay */
973#endif
971 rb->lcd_clear_display(); 974 rb->lcd_clear_display();
972 } 975 }
973 while (status > PLUGIN_OTHER); 976 while (status > PLUGIN_OTHER);
974#ifdef USEGSLIB 977#ifdef USEGSLIB
975 grey_show(false); /* switch off overlay */
976 rb->lcd_update(); 978 rb->lcd_update();
977#endif 979#endif
978 return status; 980 return status;