mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
Refactor menu_list_populate_generic
This commit is contained in:
parent
04a0af0372
commit
883af7dd82
@ -16,10 +16,13 @@
|
||||
#ifndef _DISP_SHARED_H
|
||||
#define _DISP_SHARED_H
|
||||
|
||||
#include "../../settings.h"
|
||||
#include <time.h>
|
||||
|
||||
#include <string/string_list.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <time.h>
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "../../settings.h"
|
||||
|
||||
#include "../menu_display.h"
|
||||
#include "../menu_entries_cbs.h"
|
||||
|
@ -1944,8 +1944,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
driver_t *driver = driver_get_ptr();
|
||||
const ui_companion_driver_t *ui = ui_companion_get_ptr();
|
||||
|
||||
menu_list_populate_generic(info->list,
|
||||
info->path, info->label, info->type, need_refresh);
|
||||
menu_list_populate_generic(info, need_refresh);
|
||||
|
||||
if (ui && driver)
|
||||
ui->notify_list_loaded(driver->ui_companion_data,
|
||||
|
@ -409,12 +409,11 @@ void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx,
|
||||
file_list_get_alt_at_offset(list, idx, alt);
|
||||
}
|
||||
|
||||
int menu_list_populate_generic(file_list_t *list, const char *path,
|
||||
const char *label, unsigned type, bool need_refresh)
|
||||
int menu_list_populate_generic(menu_displaylist_info_t *info, bool need_refresh)
|
||||
{
|
||||
if (need_refresh)
|
||||
menu_list_refresh(list);
|
||||
menu_driver_populate_entries(path, label, type);
|
||||
menu_list_refresh(info->list);
|
||||
menu_driver_populate_entries(info->path, info->label, info->type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <stddef.h>
|
||||
#include <file/file_list.h>
|
||||
|
||||
#include "menu_displaylist.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -86,8 +88,7 @@ void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||
|
||||
void menu_list_refresh(file_list_t *list);
|
||||
|
||||
int menu_list_populate_generic(file_list_t *list,
|
||||
const char *path, const char *label, unsigned type,
|
||||
int menu_list_populate_generic(menu_displaylist_info_t *info,
|
||||
bool need_refresh);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user