mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Tree / Playlist Viewer / Menu: Fix redraw issues
1) Tree_lists was only initialized when booting the player. In cases where a skin used custom UI viewports of different sizes, when switching between screens, such as between root menu, QuickScreen, and tree browser, this caused list titles to appear with a significant delay, unless a GUI_EVENT_ACTIONUPDATE was sent. Tree_lists is now initialized when entering dirbrowse or when restoring/reloading the list. This eliminates multiple redundant UI refreshes when entering the tree browser, due to gui_synclist_draw not being called twice anymore and by being able to omit GUI_EVENT_ACTIONUPDATE. Separate calls to gui_synclist_init_display_settings have become unnecessary since it is already called by gui_synclist_init. 2) The synclist is also re-initialized when returning from the QuickScreen in the Playlist Viewer or regular menus, or when returning from Settings menus Change-Id: I2884249eda55f782e97abad9dc19b3d9d1267fc9
This commit is contained in:
parent
a9a284c1a0
commit
66a411a1ba
5 changed files with 17 additions and 23 deletions
|
@ -466,6 +466,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
done = true;
|
||||
}
|
||||
}
|
||||
if (!done)
|
||||
init_menu_lists(menu, &lists, lists.selected_item, false, vps);
|
||||
redraw_lists = true;
|
||||
}
|
||||
#endif
|
||||
|
@ -670,7 +672,9 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
case MT_SETTING_W_TEXT:
|
||||
{
|
||||
do_setting_from_menu(temp, vps);
|
||||
send_event(GUI_EVENT_ACTIONUPDATE, (void*)1); /* force a redraw */
|
||||
init_menu_lists(menu, &lists, selected, false, vps);
|
||||
redraw_lists = true;
|
||||
|
||||
break;
|
||||
}
|
||||
case MT_RETURN_ID:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue