(Menu) Refactor MENU_SETTINGS_CONFIG

This commit is contained in:
twinaphex 2014-09-04 19:43:54 +02:00
parent b98c74bf25
commit d14effc3b0
4 changed files with 6 additions and 7 deletions

View File

@ -1282,7 +1282,7 @@ static int menu_setting_ok_toggle(unsigned type,
else if (
menu_common_type_is(label, type) == MENU_SETTINGS ||
!strcmp(label, "core_list") ||
type == MENU_SETTINGS_CONFIG ||
!strcmp(label, "configurations") ||
type == MENU_SETTINGS_DISK_APPEND
)
{
@ -1893,7 +1893,7 @@ static int menu_action_ok(const char *dir,
return -1;
#endif
}
else if (menu_type == MENU_SETTINGS_CONFIG
else if (!strcmp(menu_label, "configurations")
&& type == MENU_FILE_PLAIN)
{
char config[PATH_MAX];
@ -2285,7 +2285,7 @@ static void menu_common_setting_set_label(char *type_str,
if (setting)
{
if (type == MENU_SETTINGS_CONFIG)
if (!strcmp(setting->name, "configurations"))
{
if (*g_extern.config_path)
fill_pathname_base(type_str, g_extern.config_path,

View File

@ -9,7 +9,7 @@ static void get_title(const char *label, const char *dir,
snprintf(title, sizeof_title, "CORE SELECTION %s", dir);
else if (!strcmp(label, "deferred_core_list"))
snprintf(title, sizeof_title, "DETECTED CORES %s", dir);
else if (menu_type == MENU_SETTINGS_CONFIG)
else if (!strcmp(label, "configurations"))
snprintf(title, sizeof_title, "CONFIG %s", dir);
else if (menu_type == MENU_SETTINGS_DISK_APPEND)
snprintf(title, sizeof_title, "DISK APPEND %s", dir);

View File

@ -104,7 +104,6 @@ typedef enum
MENU_SETTINGS_SHADER_PRESET_SAVE,
// settings options are done here too
MENU_SETTINGS_CONFIG,
MENU_SETTINGS_DISK_OPTIONS,
MENU_SETTINGS_DISK_INDEX,
MENU_SETTINGS_DISK_APPEND,

View File

@ -116,7 +116,7 @@ int menu_entries_push_list(menu_handle_t *menu,
add_setting_entry(menu,list,"resume_content", MENU_FILE_SWITCH, setting_data);
add_setting_entry(menu,list,"restart_content", MENU_FILE_SWITCH, setting_data);
add_setting_entry(menu,list,"restart_retroarch", MENU_FILE_SWITCH, setting_data);
add_setting_entry(menu,list,"configurations", MENU_SETTINGS_CONFIG, setting_data);
add_setting_entry(menu,list,"configurations", 0, setting_data);
add_setting_entry(menu,list,"save_new_config", MENU_FILE_SWITCH, setting_data);
add_setting_entry(menu,list,"help", MENU_FILE_SWITCH, setting_data);
add_setting_entry(menu,list,"quit_retroarch", MENU_FILE_SWITCH, setting_data);
@ -577,7 +577,7 @@ int menu_parse_check(const char *label, unsigned menu_type)
!strcmp(label, "video_filter") ||
!strcmp(label, "audio_dsp_plugin") ||
!strcmp(label, "core_list") ||
menu_type == MENU_SETTINGS_CONFIG ||
!strcmp(label, "configurations") ||
menu_type == MENU_SETTINGS_DISK_APPEND)))
return -1;
return 0;