Get rid of more duplicate pointer grabbing

This commit is contained in:
twinaphex 2021-04-08 02:02:30 +02:00
parent f8ec815467
commit 9f6a5e35de
3 changed files with 7 additions and 7 deletions

View File

@ -5607,7 +5607,7 @@ unsigned menu_displaylist_build_list(
case DISPLAYLIST_EXPLORE: case DISPLAYLIST_EXPLORE:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, list); menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, list);
#if defined(HAVE_LIBRETRODB) #if defined(HAVE_LIBRETRODB)
count = menu_displaylist_explore(list); count = menu_displaylist_explore(list, settings);
#endif #endif
break; break;
case DISPLAYLIST_SCAN_DIRECTORY_LIST: case DISPLAYLIST_SCAN_DIRECTORY_LIST:

View File

@ -331,7 +331,7 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list);
bool menu_displaylist_has_subsystems(void); bool menu_displaylist_has_subsystems(void);
#if defined(HAVE_LIBRETRODB) #if defined(HAVE_LIBRETRODB)
unsigned menu_displaylist_explore(file_list_t *list); unsigned menu_displaylist_explore(file_list_t *list, settings_t *settings);
#endif #endif
enum filebrowser_enums filebrowser_get_type(void); enum filebrowser_enums filebrowser_get_type(void);

View File

@ -399,7 +399,7 @@ static void explore_load_icons(explore_state_t *state)
} }
} }
static explore_state_t *explore_build_list(void) static explore_state_t *explore_build_list(settings_t *settings)
{ {
unsigned i; unsigned i;
char tmp[PATH_MAX_LENGTH]; char tmp[PATH_MAX_LENGTH];
@ -415,7 +415,6 @@ static explore_state_t *explore_build_list(void)
int *rdb_indices = NULL; int *rdb_indices = NULL;
explore_string_t **cat_maps[EXPLORE_CAT_COUNT] = {NULL}; explore_string_t **cat_maps[EXPLORE_CAT_COUNT] = {NULL};
explore_string_t **split_buf = NULL; explore_string_t **split_buf = NULL;
settings_t *settings = config_get_ptr();
const char *directory_playlist = settings->paths.directory_playlist; const char *directory_playlist = settings->paths.directory_playlist;
const char *directory_database = settings->paths.path_content_database; const char *directory_database = settings->paths.path_content_database;
libretro_vfs_implementation_dir *dir = NULL; libretro_vfs_implementation_dir *dir = NULL;
@ -834,7 +833,8 @@ static int explore_action_ok_find(const char *path, const char *label, unsigned
return 0; return 0;
} }
unsigned menu_displaylist_explore(file_list_t *list) unsigned menu_displaylist_explore(file_list_t *list,
settings_t *settings)
{ {
unsigned i, cat; unsigned i, cat;
char tmp[512]; char tmp[512];
@ -844,7 +844,7 @@ unsigned menu_displaylist_explore(file_list_t *list)
if (!explore_state) if (!explore_state)
{ {
explore_state = explore_build_list(); explore_state = explore_build_list(settings);
explore_state->top_depth = (unsigned)menu_stack->size - 1; explore_state->top_depth = (unsigned)menu_stack->size - 1;
explore_load_icons(explore_state); explore_load_icons(explore_state);
} }
@ -1177,7 +1177,7 @@ SKIP_ENTRY:;
pl_entry->path, sizeof(menu->deferred_path)); pl_entry->path, sizeof(menu->deferred_path));
info.list = list; info.list = list;
menu_displaylist_ctl(DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS, &info, menu_displaylist_ctl(DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS, &info,
config_get_ptr()); settings);
break; break;
} }
} }