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:
parent
395cdc5945
commit
6f2726e79a
1 changed files with 5 additions and 1 deletions
|
@ -264,8 +264,12 @@ void gui_usb_screen_run(bool early_usb)
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
struct screen *screen = &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->set_viewport(NULL);
|
||||||
|
screen->scroll_stop();
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
/* Quick fix. Viewports should really be enabled proper for charcell */
|
/* Quick fix. Viewports should really be enabled proper for charcell */
|
||||||
viewport_set_defaults(&usb_screen_vps_ar[i].parent, i);
|
viewport_set_defaults(&usb_screen_vps_ar[i].parent, i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue