From 66a411a1ba6d3668b002760ce2d26bca42db894f Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Mon, 5 Dec 2022 20:05:15 +0100 Subject: 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 --- apps/tree.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/tree.h') diff --git a/apps/tree.h b/apps/tree.h index 56fdb2e0bb..bb9ff87163 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -102,7 +102,7 @@ struct entry* tree_get_entries(struct tree_context *t); struct entry* tree_get_entry_at(struct tree_context *t, int index); void tree_mem_init(void) INIT_ATTR; -void tree_gui_init(void) INIT_ATTR; +void tree_init(void) INIT_ATTR; char* get_current_file(char* buffer, size_t buffer_len); void set_dirfilter(int l_dirfilter); void set_current_file(const char *path); @@ -133,5 +133,4 @@ void tree_restore(void); bool bookmark_play(char* resume_file, int index, unsigned long elapsed, unsigned long offset, int seed, char *filename); -extern struct gui_synclist tree_lists; #endif -- cgit v1.2.3