diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-03-18 12:24:44 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-03-18 12:24:44 +0100 |
commit | 6f2726e79a84e51a53390c6d1d2966a6c26434af (patch) | |
tree | 191010bebb1ea12c05f3e4f0cdfa77acfd336403 | |
parent | 395cdc5945e251d7d5d87d3a44fc7574dcd419d4 (diff) | |
download | rockbox-6f2726e79a84e51a53390c6d1d2966a6c26434af.tar.gz rockbox-6f2726e79a84e51a53390c6d1d2966a6c26434af.zip |
usb screen: Stop scrolling the entire display.
It's not easy for the originating screen to perform cleanup in case of USB
because the usb screen is invoked indirectly via default_event_handler(). To
avoid stale scrolling lines perform the cleanup in the usb screen itself.
Side effect should be no worse than scrolling lines to restart in SBSes that
show during USB.
Change-Id: I9aa491b3d4b649c0b3be70048ebcb9d817c0356c
-rw-r--r-- | apps/gui/usb_screen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index 569e694870..20af4dc3da 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c | |||
@@ -264,8 +264,12 @@ void gui_usb_screen_run(bool early_usb) | |||
264 | FOR_NB_SCREENS(i) | 264 | FOR_NB_SCREENS(i) |
265 | { | 265 | { |
266 | struct screen *screen = &screens[i]; | 266 | struct screen *screen = &screens[i]; |
267 | 267 | /* we might be coming from anywhere, and the originating screen | |
268 | * can't be practically expected to cleanup the UI because | ||
269 | * we're invoked via default_event_handler(), therefore we make a | ||
270 | * generic cleanup here */ | ||
268 | screen->set_viewport(NULL); | 271 | screen->set_viewport(NULL); |
272 | screen->scroll_stop(); | ||
269 | #ifdef HAVE_LCD_CHARCELLS | 273 | #ifdef HAVE_LCD_CHARCELLS |
270 | /* Quick fix. Viewports should really be enabled proper for charcell */ | 274 | /* Quick fix. Viewports should really be enabled proper for charcell */ |
271 | viewport_set_defaults(&usb_screen_vps_ar[i].parent, i); | 275 | viewport_set_defaults(&usb_screen_vps_ar[i].parent, i); |