mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(Menu) Refactor MENU_SETTINGS_CORE_OPTIONS
This commit is contained in:
parent
b6b5896bab
commit
6116fb4b33
@ -53,7 +53,7 @@ static void get_title(const char *label, const char *dir,
|
||||
strlcpy(title, "AUDIO OPTIONS", sizeof_title);
|
||||
else if (menu_type == MENU_SETTINGS_DISK_OPTIONS)
|
||||
strlcpy(title, "DISK OPTIONS", sizeof_title);
|
||||
else if (menu_type == MENU_SETTINGS_CORE_OPTIONS)
|
||||
else if (!strcmp(label, "core_options"))
|
||||
strlcpy(title, "CORE OPTIONS", sizeof_title);
|
||||
else if (!strcmp(label, "core_information"))
|
||||
strlcpy(title, "CORE INFO", sizeof_title);
|
||||
|
@ -645,7 +645,7 @@ unsigned menu_common_type_is(const char *label, unsigned type)
|
||||
if (
|
||||
type == MENU_SETTINGS ||
|
||||
type == MENU_SETTINGS_GENERAL_OPTIONS ||
|
||||
type == MENU_SETTINGS_CORE_OPTIONS ||
|
||||
!strcmp(label, "core_options") ||
|
||||
!strcmp(label, "core_information") ||
|
||||
type == MENU_SETTINGS_VIDEO_OPTIONS ||
|
||||
type == MENU_SETTINGS_FONT_OPTIONS ||
|
||||
|
@ -108,7 +108,6 @@ typedef enum
|
||||
|
||||
// settings options are done here too
|
||||
MENU_SETTINGS_CONFIG,
|
||||
MENU_SETTINGS_CORE_OPTIONS,
|
||||
MENU_SETTINGS_AUDIO_OPTIONS,
|
||||
MENU_SETTINGS_INPUT_OPTIONS,
|
||||
MENU_SETTINGS_PATH_OPTIONS,
|
||||
|
@ -106,7 +106,7 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
add_setting_entry(menu,list,"history_list", 0, setting_data);
|
||||
add_setting_entry(menu,list,"detect_core_list", 0, setting_data);
|
||||
add_setting_entry(menu,list,"load_content", 0, setting_data);
|
||||
add_setting_entry(menu,list,"core_options", MENU_SETTINGS_CORE_OPTIONS, setting_data);
|
||||
add_setting_entry(menu,list,"core_options", MENU_FILE_SWITCH, setting_data);
|
||||
add_setting_entry(menu,list,"core_information", 0, setting_data);
|
||||
add_setting_entry(menu,list,"settings", MENU_SETTINGS_OPTIONS, setting_data);
|
||||
add_setting_entry(menu,list,"performance_counters", MENU_FILE_SWITCH, setting_data);
|
||||
@ -328,6 +328,22 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
add_setting_entry(menu,list,"input_overlay_opacity", 0, setting_data);
|
||||
add_setting_entry(menu,list,"input_overlay_scale", 0, setting_data);
|
||||
}
|
||||
else if (!strcmp(label, "core_options"))
|
||||
{
|
||||
file_list_clear(list);
|
||||
if (g_extern.system.core_options)
|
||||
{
|
||||
size_t i;
|
||||
size_t opts = core_option_size(g_extern.system.core_options);
|
||||
for (i = 0; i < opts; i++)
|
||||
file_list_push(list,
|
||||
core_option_get_desc(g_extern.system.core_options, i), "",
|
||||
MENU_SETTINGS_CORE_OPTION_START + i, 0);
|
||||
}
|
||||
else
|
||||
file_list_push(list, "No options available.", "",
|
||||
MENU_SETTINGS_CORE_OPTION_NONE, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (menu_type)
|
||||
@ -429,23 +445,6 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
add_setting_entry(menu,list,"video_font_enable", 0, setting_data);
|
||||
add_setting_entry(menu,list,"video_font_size", 0, setting_data);
|
||||
break;
|
||||
case MENU_SETTINGS_CORE_OPTIONS:
|
||||
file_list_clear(list);
|
||||
|
||||
if (g_extern.system.core_options)
|
||||
{
|
||||
size_t i, opts;
|
||||
|
||||
opts = core_option_size(g_extern.system.core_options);
|
||||
for (i = 0; i < opts; i++)
|
||||
file_list_push(list,
|
||||
core_option_get_desc(g_extern.system.core_options, i), "",
|
||||
MENU_SETTINGS_CORE_OPTION_START + i, 0);
|
||||
}
|
||||
else
|
||||
file_list_push(list, "No options available.", "",
|
||||
MENU_SETTINGS_CORE_OPTION_NONE, 0);
|
||||
break;
|
||||
case MENU_SETTINGS_OPTIONS:
|
||||
file_list_clear(list);
|
||||
add_setting_entry(menu,list,"Driver Options", MENU_SETTINGS_DRIVERS, setting_data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user