1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Thomas Martitz 2014-03-18 12:24:44 +01:00
parent 395cdc5945
commit 6f2726e79a

View file

@ -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);