mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Get rid of last menu_hash_to_str instance
This commit is contained in:
parent
b6972f9926
commit
3320e44329
@ -822,10 +822,9 @@ enum
|
||||
ACTION_OK_SET_PATH
|
||||
};
|
||||
|
||||
|
||||
static int generic_action_ok(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx,
|
||||
unsigned id, unsigned flush_id)
|
||||
unsigned id, enum menu_hash_enums flush_id)
|
||||
{
|
||||
char action_path[PATH_MAX_LENGTH] = {0};
|
||||
unsigned flush_type = 0;
|
||||
@ -845,12 +844,10 @@ static int generic_action_ok(const char *path,
|
||||
NULL, NULL);
|
||||
|
||||
fill_pathname_join(action_path, menu_path, path, sizeof(action_path));
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case ACTION_OK_LOAD_WALLPAPER:
|
||||
flush_char = NULL;
|
||||
flush_type = 49;
|
||||
if (path_file_exists(action_path))
|
||||
{
|
||||
@ -863,7 +860,6 @@ static int generic_action_ok(const char *path,
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_LOAD_CORE:
|
||||
flush_char = NULL;
|
||||
flush_type = MENU_SETTINGS;
|
||||
|
||||
if (task_push_content_load_default(action_path,
|
||||
@ -877,7 +873,6 @@ static int generic_action_ok(const char *path,
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_LOAD_CONFIG_FILE:
|
||||
flush_char = NULL;
|
||||
flush_type = MENU_SETTINGS;
|
||||
menu_display_set_msg_force(true);
|
||||
|
||||
@ -890,11 +885,13 @@ static int generic_action_ok(const char *path,
|
||||
break;
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
case ACTION_OK_LOAD_PRESET:
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
menu_shader_manager_set_preset(shader,
|
||||
video_shader_parse_type(action_path, RARCH_SHADER_NONE),
|
||||
action_path);
|
||||
break;
|
||||
case ACTION_OK_LOAD_SHADER_PASS:
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
strlcpy(
|
||||
shader->pass[hack_shader_pass].source.path,
|
||||
action_path,
|
||||
@ -905,6 +902,7 @@ static int generic_action_ok(const char *path,
|
||||
case ACTION_OK_LOAD_RECORD_CONFIGFILE:
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
strlcpy(global->record.config, action_path,
|
||||
sizeof(global->record.config));
|
||||
}
|
||||
@ -912,25 +910,25 @@ static int generic_action_ok(const char *path,
|
||||
case ACTION_OK_LOAD_REMAPPING_FILE:
|
||||
{
|
||||
config_file_t *conf = config_file_new(action_path);
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
|
||||
if (conf)
|
||||
input_remapping_load_file(conf, action_path);
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_LOAD_CHEAT_FILE:
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
cheat_manager_free();
|
||||
|
||||
if (!cheat_manager_load(action_path))
|
||||
goto error;
|
||||
break;
|
||||
case ACTION_OK_APPEND_DISK_IMAGE:
|
||||
flush_char = NULL;
|
||||
flush_type = 49;
|
||||
command_event(CMD_EVENT_DISK_APPEND_IMAGE, action_path);
|
||||
command_event(CMD_EVENT_RESUME, NULL);
|
||||
break;
|
||||
case ACTION_OK_SET_PATH:
|
||||
flush_char = NULL;
|
||||
flush_type = 49;
|
||||
{
|
||||
menu_file_list_cbs_t *cbs =
|
||||
@ -945,6 +943,7 @@ static int generic_action_ok(const char *path,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
flush_char = menu_hash_to_str(flush_id);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -960,7 +959,7 @@ static int action_ok_set_path(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_SET_PATH, MENU_SETTINGS);
|
||||
ACTION_OK_SET_PATH, MENU_ENUM_LABEL_UNKNOWN);
|
||||
}
|
||||
|
||||
static int action_ok_menu_wallpaper_load(const char *path,
|
||||
@ -968,42 +967,42 @@ static int action_ok_menu_wallpaper_load(const char *path,
|
||||
{
|
||||
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_WALLPAPER, MENU_SETTINGS);
|
||||
ACTION_OK_LOAD_WALLPAPER, MENU_ENUM_LABEL_UNKNOWN);
|
||||
}
|
||||
|
||||
static int action_ok_load_core(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_CORE, MENU_SETTINGS);
|
||||
ACTION_OK_LOAD_CORE, MENU_ENUM_LABEL_UNKNOWN);
|
||||
}
|
||||
|
||||
static int action_ok_config_load(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_CONFIG_FILE, MENU_SETTINGS);
|
||||
ACTION_OK_LOAD_CONFIG_FILE, MENU_ENUM_LABEL_UNKNOWN);
|
||||
}
|
||||
|
||||
static int action_ok_disk_image_append(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_APPEND_DISK_IMAGE, MENU_SETTINGS);
|
||||
ACTION_OK_APPEND_DISK_IMAGE, MENU_ENUM_LABEL_UNKNOWN);
|
||||
}
|
||||
|
||||
static int action_ok_cheat_file_load(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_CHEAT_FILE, MENU_LABEL_CORE_CHEAT_OPTIONS);
|
||||
ACTION_OK_LOAD_CHEAT_FILE, MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS);
|
||||
}
|
||||
|
||||
static int action_ok_record_configfile_load(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_RECORD_CONFIGFILE, MENU_LABEL_RECORDING_SETTINGS);
|
||||
ACTION_OK_LOAD_RECORD_CONFIGFILE, MENU_ENUM_LABEL_RECORDING_SETTINGS);
|
||||
}
|
||||
|
||||
static int action_ok_remap_file_load(const char *path,
|
||||
@ -1011,21 +1010,21 @@ static int action_ok_remap_file_load(const char *path,
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_REMAPPING_FILE,
|
||||
MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS);
|
||||
MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS);
|
||||
}
|
||||
|
||||
static int action_ok_shader_preset_load(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_PRESET, MENU_LABEL_SHADER_OPTIONS);
|
||||
ACTION_OK_LOAD_PRESET, MENU_ENUM_LABEL_SHADER_OPTIONS);
|
||||
}
|
||||
|
||||
static int action_ok_shader_pass_load(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return generic_action_ok(path, label, type, idx, entry_idx,
|
||||
ACTION_OK_LOAD_SHADER_PASS, MENU_LABEL_SHADER_OPTIONS);
|
||||
ACTION_OK_LOAD_SHADER_PASS, MENU_ENUM_LABEL_SHADER_OPTIONS);
|
||||
}
|
||||
|
||||
static int generic_action_ok_help(const char *path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user