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