diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-10-16 12:53:34 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-10-16 13:02:12 -0400 |
commit | 56d422789706d91edb301373330c259aa2955385 (patch) | |
tree | 60cc5878e66a58de57f6c45b1b246d70e462f615 | |
parent | 5e864ecde98fbb2f115f75a3c5c13fa871f4d3f9 (diff) | |
download | rockbox-56d422789706d91edb301373330c259aa2955385.tar.gz rockbox-56d422789706d91edb301373330c259aa2955385.zip |
yesno_res gui_syncyesno_run fix scroll run-on bug
the GUI_EVENT_NEED_UI_UPDATE event was not canceled till
after the call to scroll_stop this resulted in the scrolled line
being re-added after the function was done causing a crash
thanks spork, amachronic
Change-Id: I2e484a2b877f6da63171eb997f62a21e95ca9bfc
-rw-r--r-- | apps/gui/yesno.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index a79b8ae644..c763753cd7 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -253,14 +253,15 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, | |||
253 | if(result_displayed) | 253 | if(result_displayed) |
254 | sleep(HZ); | 254 | sleep(HZ); |
255 | 255 | ||
256 | exit: | ||
257 | remove_event_ex(GUI_EVENT_NEED_UI_UPDATE, gui_yesno_ui_update, &yn[0]); | ||
258 | |||
256 | FOR_NB_SCREENS(i) | 259 | FOR_NB_SCREENS(i) |
257 | { | 260 | { |
258 | screens[i].scroll_stop_viewport(yn[i].vp); | 261 | screens[i].scroll_stop_viewport(yn[i].vp); |
259 | viewportmanager_theme_undo(i, true); | 262 | viewportmanager_theme_undo(i, true); |
260 | } | 263 | } |
261 | 264 | ||
262 | exit: | ||
263 | remove_event_ex(GUI_EVENT_NEED_UI_UPDATE, gui_yesno_ui_update, &yn[0]); | ||
264 | #ifdef HAVE_TOUCHSCREEN | 265 | #ifdef HAVE_TOUCHSCREEN |
265 | touchscreen_set_mode(old_mode); | 266 | touchscreen_set_mode(old_mode); |
266 | #endif | 267 | #endif |