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) |
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) FOR_NB_SCREENS(i) { struct screen *screen = &screens[i]; - + /* we might be coming from anywhere, and the originating screen + * can't be practically expected to cleanup the UI because + * we're invoked via default_event_handler(), therefore we make a + * generic cleanup here */ screen->set_viewport(NULL); + screen->scroll_stop(); #ifdef HAVE_LCD_CHARCELLS /* Quick fix. Viewports should really be enabled proper for charcell */ viewport_set_defaults(&usb_screen_vps_ar[i].parent, i); |