mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Add DISPLAYLIST_GENERIC
This commit is contained in:
parent
49a190b454
commit
9f8f176141
@ -1779,7 +1779,6 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
bool need_push = false;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
menu_list_clear(info->list);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -1787,51 +1786,68 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
break;
|
||||
case DISPLAYLIST_MAIN_MENU:
|
||||
case DISPLAYLIST_SETTINGS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_settings(menu, info, info->flags);
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_GENERIC:
|
||||
menu_driver_list_cache(false, 0);
|
||||
|
||||
menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr);
|
||||
menu_navigation_clear(&menu->navigation, true);
|
||||
menu_set_refresh();
|
||||
break;
|
||||
case DISPLAYLIST_SETTINGS_ALL:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_all_settings(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_SETTINGS_SUBGROUP:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_settings_in_subgroup(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_HORIZONTAL:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_horizontal_list(info);
|
||||
|
||||
need_refresh = true;
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_horizontal_content_actions(info);
|
||||
need_refresh = true;
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_options(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_CHEATS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_options_cheats(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_MANAGEMENT:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_options_management(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_REMAPPINGS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_options_remappings(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_VIDEO:
|
||||
menu_list_clear(info->list);
|
||||
#if defined(GEKKO) || defined(__CELLOS_LV2__)
|
||||
menu_list_push(info->list, "Screen Resolution", "",
|
||||
MENU_SETTINGS_VIDEO_RESOLUTION, 0);
|
||||
@ -1846,11 +1862,13 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_DISK:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_disk_options(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_SHADERS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_shader_options(info);
|
||||
|
||||
need_push = true;
|
||||
@ -1872,6 +1890,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
case DISPLAYLIST_RECORD_CONFIG_FILES:
|
||||
case DISPLAYLIST_CONFIG_FILES:
|
||||
case DISPLAYLIST_CONTENT_HISTORY:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse(info, &need_sort);
|
||||
if (ret == 0)
|
||||
{
|
||||
@ -1880,16 +1899,19 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
}
|
||||
break;
|
||||
case DISPLAYLIST_CORE_OPTIONS:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_core_options(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_CORE_INFO:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_core_info(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_CORES_ALL:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_cores(info);
|
||||
|
||||
need_sort = true;
|
||||
@ -1897,11 +1919,13 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_SYSTEM_INFO:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_system_info(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_HISTORY:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_historylist(info);
|
||||
|
||||
if (ret == 0)
|
||||
@ -1911,6 +1935,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
}
|
||||
break;
|
||||
case DISPLAYLIST_DATABASE_QUERY:
|
||||
menu_list_clear(info->list);
|
||||
menu_database_populate_query(info->list, info->path, (info->path_c[0] == '\0') ? NULL : info->path_c);
|
||||
|
||||
need_sort = true;
|
||||
@ -1919,11 +1944,13 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
strlcpy(info->path, info->path_b, sizeof(info->path));
|
||||
break;
|
||||
case DISPLAYLIST_DATABASE_ENTRY:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_parse_database_entry(info);
|
||||
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_PERFCOUNTER_SELECTION:
|
||||
menu_list_clear(info->list);
|
||||
menu_list_push(info->list, "Frontend Counters", "frontend_counters",
|
||||
MENU_SETTING_ACTION, 0);
|
||||
menu_list_push(info->list, "Core Counters", "core_counters",
|
||||
@ -1934,6 +1961,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
break;
|
||||
case DISPLAYLIST_PERFCOUNTERS_CORE:
|
||||
case DISPLAYLIST_PERFCOUNTERS_FRONTEND:
|
||||
menu_list_clear(info->list);
|
||||
ret = menu_displaylist_push_perfcounter_generic(info,
|
||||
(type == DISPLAYLIST_PERFCOUNTERS_CORE) ?
|
||||
perf_counters_libretro : perf_counters_rarch,
|
||||
@ -1946,6 +1974,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_CORES_UPDATER:
|
||||
menu_list_clear(info->list);
|
||||
#ifdef HAVE_NETWORKING
|
||||
print_buf_lines(info->list, core_buf, core_len, MENU_FILE_DOWNLOAD_CORE);
|
||||
need_push = true;
|
||||
@ -1954,6 +1983,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
break;
|
||||
case DISPLAYLIST_SHADER_PARAMETERS:
|
||||
case DISPLAYLIST_SHADER_PARAMETERS_PRESET:
|
||||
menu_list_clear(info->list);
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
{
|
||||
struct video_shader *shader = video_shader_driver_get_current_shader();
|
||||
|
@ -31,6 +31,7 @@ enum
|
||||
{
|
||||
DISPLAYLIST_NONE = 0,
|
||||
DISPLAYLIST_MAIN_MENU,
|
||||
DISPLAYLIST_GENERIC,
|
||||
DISPLAYLIST_SETTINGS,
|
||||
DISPLAYLIST_SETTINGS_ALL,
|
||||
DISPLAYLIST_SETTINGS_SUBGROUP,
|
||||
@ -86,6 +87,7 @@ typedef struct menu_displaylist_info
|
||||
char exts[PATH_MAX_LENGTH];
|
||||
unsigned type;
|
||||
unsigned type_default;
|
||||
size_t directory_ptr;
|
||||
unsigned flags;
|
||||
rarch_setting_t *setting;
|
||||
} menu_displaylist_info_t;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "menu_setting.h"
|
||||
#include "menu_input.h"
|
||||
#include "../settings.h"
|
||||
#include "../runloop_data.h"
|
||||
#include "drivers/shared.h"
|
||||
|
||||
// This file provides an abstraction of the currently displayed
|
||||
|
@ -382,19 +382,21 @@ int menu_list_push_stack_refresh(menu_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr)
|
||||
{
|
||||
menu_displaylist_info_t info = {0};
|
||||
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return -1;
|
||||
if (!list)
|
||||
return -1;
|
||||
|
||||
menu_driver_list_cache(false, 0);
|
||||
|
||||
menu_list_push(list->menu_stack, path, label, type, directory_ptr);
|
||||
menu_navigation_clear(&menu->navigation, true);
|
||||
menu_set_refresh();
|
||||
|
||||
return 0;
|
||||
info.list = list->menu_stack;
|
||||
info.type = type;
|
||||
info.directory_ptr = directory_ptr;
|
||||
strlcpy(info.path, path, sizeof(info.path));
|
||||
strlcpy(info.label, label, sizeof(info.label));
|
||||
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);
|
||||
}
|
||||
|
||||
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user