Undo all menu hash related changes - was causing more harm

than good - apologies to radius since we now have to recode
his shader changes PR
This commit is contained in:
twinaphex 2018-02-09 01:09:17 +01:00
parent 8e33b35b09
commit 9dc597cf6c
23 changed files with 1838 additions and 1738 deletions

View File

@ -1,6 +1,6 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2015-2017 - Andrés Suárez
* Copyright (C) 2015-2017 - Andrés Suárez
* Copyright (C) 2016-2017 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -220,7 +220,6 @@ bool command_set_shader(const char *arg)
{
char msg[256];
enum rarch_shader_type type = RARCH_SHADER_NONE;
struct video_shader *shader = menu_shader_get();
switch (msg_hash_to_file_type(msg_hash_calculate(path_get_extension(arg))))
{
@ -246,8 +245,7 @@ bool command_set_shader(const char *arg)
msg_hash_to_str(MSG_APPLYING_SHADER),
arg);
retroarch_set_shader_preset(arg);
return menu_shader_manager_set_preset(shader, type, arg);
return video_driver_set_shader(type, arg);
}
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
@ -1297,13 +1295,31 @@ static void command_event_disable_overrides(void)
return;
/* reload the original config */
config_unload_override();
rarch_ctl(RARCH_CTL_UNSET_OVERRIDES_ACTIVE, NULL);
}
static void command_event_restore_default_shader_preset(void)
{
retroarch_unset_shader_preset();
if (!path_is_empty(RARCH_PATH_DEFAULT_SHADER_PRESET))
{
/* auto shader preset: reload the original shader */
settings_t *settings = config_get_ptr();
const char *shader_preset = path_get(RARCH_PATH_DEFAULT_SHADER_PRESET);
if (!string_is_empty(shader_preset))
{
RARCH_LOG("%s %s\n",
msg_hash_to_str(MSG_RESTORING_DEFAULT_SHADER_PRESET_TO),
shader_preset);
strlcpy(settings->paths.path_shader,
shader_preset,
sizeof(settings->paths.path_shader));
}
}
path_clear(RARCH_PATH_DEFAULT_SHADER_PRESET);
}
static void command_event_restore_remaps(void)
@ -1424,7 +1440,6 @@ static bool command_event_save_core_config(void)
{
runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET), 1, 180, true);
RARCH_ERR("[Config]: %s\n", msg_hash_to_str(MSG_CONFIG_DIRECTORY_NOT_SET));
free (config_dir);
return false;
}

File diff suppressed because it is too large Load Diff

View File

@ -60,25 +60,33 @@ static int generic_shader_action_parameter_left(
return 0;
}
static int shader_action_parameter_left(unsigned type, const char *label, bool wraparound)
static int shader_action_parameter_left(unsigned type, const char *label,
bool wraparound)
{
video_shader_ctx_t shader_info;
struct video_shader_parameter *param = NULL;
video_shader_driver_get_current_shader(&shader_info);
param = &shader_info.data->parameters[type - MENU_SETTINGS_SHADER_PARAMETER_0];
param = &shader_info.data->parameters[type
- MENU_SETTINGS_SHADER_PARAMETER_0];
if (!param)
return menu_cbs_exit();
generic_shader_action_parameter_left(param, type, label, wraparound);
param = menu_shader_manager_get_parameters(
type - MENU_SETTINGS_SHADER_PARAMETER_0);
if (!param)
return menu_cbs_exit();
return generic_shader_action_parameter_left(param, type, label, wraparound);
return 0;
return generic_shader_action_parameter_left(param,
type, label, wraparound);
}
static int shader_action_parameter_preset_left(unsigned type,
const char *label,
bool wraparound)
{
struct video_shader_parameter *param = menu_shader_manager_get_parameters(
type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0);
if (!param)
return 0;
return generic_shader_action_parameter_left(param,
type, label, wraparound);
}
#endif
static int action_left_cheat(unsigned type, const char *label,
@ -457,7 +465,7 @@ static int bind_left_generic(unsigned type, const char *label,
}
static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
const char *label, const char *menu_label)
const char *label, uint32_t label_hash, const char *menu_label)
{
if (cbs->setting)
@ -477,12 +485,15 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
unsigned i;
for (i = 0; i < MAX_USERS; i++)
{
uint32_t label_setting_hash;
char label_setting[128];
label_setting[0] = '\0';
snprintf(label_setting, sizeof(label_setting), "input_player%d_joypad_index", i + 1);
label_setting_hash = msg_hash_calculate(label_setting);
if (!string_is_equal(label_setting, label))
if (label_hash != label_setting_hash)
continue;
BIND_ACTION_LEFT(cbs, bind_left_generic);
@ -606,7 +617,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
{
BIND_ACTION_LEFT(cbs, shader_action_parameter_left);
BIND_ACTION_LEFT(cbs, shader_action_parameter_preset_left);
}
#endif
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
@ -700,7 +711,8 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *menu_label)
const char *menu_label,
uint32_t label_hash)
{
if (!cbs)
return -1;
@ -727,7 +739,7 @@ int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
}
}
if (menu_cbs_init_bind_left_compare_label(cbs, label, menu_label) == 0)
if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label) == 0)
return 0;
if (menu_cbs_init_bind_left_compare_type(cbs, type, menu_label) == 0)

View File

@ -212,12 +212,9 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MSG_UNKNOWN;
}
int generic_action_ok_displaylist_push(
const char *path,
int generic_action_ok_displaylist_push(const char *path,
const char *new_path,
const char *label,
unsigned type,
size_t idx, size_t entry_idx,
const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned action_type)
{
menu_displaylist_info_t info;
@ -1868,8 +1865,7 @@ default_action_dialog_start(action_ok_rename_entry,
enum
{
ACTION_OK_SHADER_PRESET_SAVE_CORE = 0,
ACTION_OK_SHADER_PRESET_SAVE_GAME,
ACTION_OK_SHADER_PRESET_SAVE_PARENT
ACTION_OK_SHADER_PRESET_SAVE_GAME
};
static int generic_action_ok_shader_preset_save(const char *path,
@ -1916,12 +1912,6 @@ static int generic_action_ok_shader_preset_save(const char *path,
fill_pathname_join(file, directory, game_name, sizeof(file));
}
break;
case ACTION_OK_SHADER_PRESET_SAVE_PARENT:
{
fill_pathname_parent_dir_name(tmp, path_get(RARCH_PATH_BASENAME), sizeof(tmp));
fill_pathname_join(file, directory, tmp, sizeof(file));
}
break;
}
if(menu_shader_manager_save_preset(file, false, true))
@ -1950,12 +1940,7 @@ static int action_ok_shader_preset_save_game(const char *path,
idx, entry_idx, ACTION_OK_SHADER_PRESET_SAVE_GAME);
}
static int action_ok_shader_preset_save_parent(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
return generic_action_ok_shader_preset_save(path, label, type,
idx, entry_idx, ACTION_OK_SHADER_PRESET_SAVE_PARENT);
}
static int generic_action_ok_remap_file_operation(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx,
@ -2281,24 +2266,23 @@ static int action_ok_undo_save_state(const char *path,
#ifdef HAVE_ZLIB
static void cb_decompressed(void *task_data, void *user_data, const char *err)
{
decompress_task_data_t *dec = (decompress_task_data_t*)task_data;
enum msg_hash_enums *enum_idx = (enum msg_hash_enums*)user_data;
decompress_task_data_t *dec = (decompress_task_data_t*)task_data;
if (dec && !err && enum_idx)
if (dec && !err)
{
const char *msg = msg_hash_to_str(*enum_idx);
unsigned type_hash = (unsigned)(uintptr_t)user_data;
if (string_is_equal(msg,
msg_hash_to_str(MENU_ENUM_LABEL_CB_CORE_UPDATER_DOWNLOAD)))
generic_action_ok_command(CMD_EVENT_CORE_INFO_INIT);
else if (string_is_equal(msg,
msg_hash_to_str(MENU_ENUM_LABEL_CB_UPDATE_ASSETS)))
generic_action_ok_command(CMD_EVENT_REINIT);
switch (type_hash)
{
case CB_CORE_UPDATER_DOWNLOAD:
generic_action_ok_command(CMD_EVENT_CORE_INFO_INIT);
break;
case CB_UPDATE_ASSETS:
generic_action_ok_command(CMD_EVENT_REINIT);
break;
}
}
if (user_data)
free(user_data);
if (err)
RARCH_ERR("%s", err);
@ -2554,13 +2538,10 @@ static void cb_generic_download(void *task_data,
if (path_is_compressed_file(output_path))
{
enum msg_hash_enums *idx = (enum msg_hash_enums*)calloc(1, sizeof(*idx));
*idx = transf->enum_idx;
if (!task_push_decompress(output_path, dir_path,
NULL, NULL, NULL,
cb_decompressed, idx))
cb_decompressed, (void*)(uintptr_t)
msg_hash_calculate(msg_hash_to_str(transf->enum_idx))))
{
err = msg_hash_to_str(MSG_DECOMPRESSION_FAILED);
goto finish;
@ -3751,115 +3732,9 @@ static int is_rdb_entry(enum msg_hash_enums enum_idx)
return 0;
}
struct cbs_push_lbl_callback
{
enum msg_hash_enums id;
int (*cbs)(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx);
};
static struct cbs_push_lbl_callback cbs_ok_lbl_list[] = {
{
MENU_ENUM_LABEL_FAVORITES,
action_ok_push_content_list
},
{
MENU_ENUM_LABEL_RECORD_CONFIG,
action_ok_record_configfile
},
{
MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS,
action_ok_shader_parameters
},
{
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS,
action_ok_shader_parameters
},
{
MENU_ENUM_LABEL_VIDEO_SHADER_PASS,
action_ok_shader_pass
},
{
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET,
action_ok_shader_preset
},
{
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS,
action_ok_shader_preset_save_as
},
{
MENU_ENUM_LABEL_DISK_IMAGE_APPEND,
action_ok_disk_image_append_list
},
{
MENU_ENUM_LABEL_SCREEN_RESOLUTION,
action_ok_video_resolution
},
{
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK,
action_ok_file_load_detect_core
},
{
MENU_ENUM_LABEL_ACCOUNTS_LIST,
action_ok_push_accounts_list
},
{
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
action_ok_push_downloads_dir
},
{
MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS,
action_ok_push_accounts_cheevos_list
},
{
MENU_ENUM_LABEL_LOAD_ARCHIVE,
action_ok_load_archive
},
{
MENU_ENUM_LABEL_SHADER_APPLY_CHANGES,
action_ok_shader_apply_changes
},
{
MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES,
action_ok_cheat_apply_changes
},
{
MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS,
action_ok_cheat_file_save_as
},
{
MENU_ENUM_LABEL_CHEAT_FILE_LOAD,
action_ok_cheat_file
},
{
MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN,
action_ok_audio_dsp_plugin
},
#ifdef HAVE_NETWORKING
{
MENU_ENUM_LABEL_UPDATE_LAKKA,
action_ok_lakka_list
},
#endif
{
MENU_ENUM_LABEL_OPEN_ARCHIVE,
action_ok_open_archive
},
{
MENU_ENUM_LABEL_OPEN_ARCHIVE_DETECT_CORE,
action_ok_open_archive_detect_core
},
{
MENU_ENUM_LABEL_LOAD_ARCHIVE_DETECT_CORE,
action_ok_load_archive_detect_core
}
};
static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
const char *label)
const char *label, uint32_t hash)
{
unsigned k;
if (cbs->enum_idx != MSG_UNKNOWN && is_rdb_entry(cbs->enum_idx) == 0)
{
BIND_ACTION_OK(cbs, action_ok_rdb_entry_submenu);
@ -3893,36 +3768,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
return 0;
}
for (k = 0; k < ARRAY_SIZE(cbs_ok_lbl_list); k++)
{
if (string_is_equal(label, msg_hash_to_str(cbs_ok_lbl_list[k].id)))
{
BIND_ACTION_OK(cbs, cbs_ok_lbl_list[k].cbs);
return 0;
}
}
if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES)))
{
BIND_ACTION_OK(cbs, action_ok_push_content_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_LOAD)))
{
BIND_ACTION_OK(cbs, action_ok_remap_file);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_CORE)))
{
BIND_ACTION_OK(cbs, action_ok_remap_file_save_core);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_SAVE_GAME)))
{
BIND_ACTION_OK(cbs, action_ok_remap_file_save_game);
return 0;
}
else if (cbs->enum_idx != MSG_UNKNOWN)
if (cbs->enum_idx != MSG_UNKNOWN)
{
switch (cbs->enum_idx)
{
@ -4201,9 +4047,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_core);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT:
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_parent);
break;
case MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS:
BIND_ACTION_OK(cbs, action_ok_cheat_file_save_as);
break;
@ -4345,16 +4188,99 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
default:
return -1;
}
return 0;
}
else
{
switch (hash)
{
case MENU_LABEL_OPEN_ARCHIVE_DETECT_CORE:
BIND_ACTION_OK(cbs, action_ok_open_archive_detect_core);
break;
case MENU_LABEL_OPEN_ARCHIVE:
BIND_ACTION_OK(cbs, action_ok_open_archive);
break;
case MENU_LABEL_LOAD_ARCHIVE_DETECT_CORE:
BIND_ACTION_OK(cbs, action_ok_load_archive_detect_core);
break;
case MENU_LABEL_LOAD_ARCHIVE:
BIND_ACTION_OK(cbs, action_ok_load_archive);
break;
case MENU_LABEL_VIDEO_SHADER_PASS:
BIND_ACTION_OK(cbs, action_ok_shader_pass);
break;
case MENU_LABEL_VIDEO_SHADER_PRESET:
BIND_ACTION_OK(cbs, action_ok_shader_preset);
break;
case MENU_LABEL_CHEAT_FILE_LOAD:
BIND_ACTION_OK(cbs, action_ok_cheat_file);
break;
case MENU_LABEL_AUDIO_DSP_PLUGIN:
BIND_ACTION_OK(cbs, action_ok_audio_dsp_plugin);
break;
case MENU_LABEL_REMAP_FILE_LOAD:
BIND_ACTION_OK(cbs, action_ok_remap_file);
break;
case MENU_LABEL_RECORD_CONFIG:
BIND_ACTION_OK(cbs, action_ok_record_configfile);
break;
#ifdef HAVE_NETWORKING
case MENU_LABEL_UPDATE_LAKKA:
BIND_ACTION_OK(cbs, action_ok_lakka_list);
break;
#endif
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
BIND_ACTION_OK(cbs, action_ok_shader_parameters);
break;
case MENU_LABEL_ACCOUNTS_LIST:
BIND_ACTION_OK(cbs, action_ok_push_accounts_list);
break;
case MENU_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS:
BIND_ACTION_OK(cbs, action_ok_push_accounts_cheevos_list);
break;
case MENU_LABEL_FAVORITES:
BIND_ACTION_OK(cbs, action_ok_push_content_list);
break;
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_push_downloads_dir);
break;
case MENU_LABEL_DETECT_CORE_LIST_OK:
BIND_ACTION_OK(cbs, action_ok_file_load_detect_core);
break;
case MENU_LABEL_SHADER_APPLY_CHANGES:
BIND_ACTION_OK(cbs, action_ok_shader_apply_changes);
break;
case MENU_LABEL_CHEAT_APPLY_CHANGES:
BIND_ACTION_OK(cbs, action_ok_cheat_apply_changes);
break;
case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_as);
break;
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
BIND_ACTION_OK(cbs, action_ok_cheat_file_save_as);
break;
case MENU_LABEL_REMAP_FILE_SAVE_CORE:
BIND_ACTION_OK(cbs, action_ok_remap_file_save_core);
break;
case MENU_LABEL_REMAP_FILE_SAVE_GAME:
BIND_ACTION_OK(cbs, action_ok_remap_file_save_game);
break;
case MENU_LABEL_DISK_IMAGE_APPEND:
BIND_ACTION_OK(cbs, action_ok_disk_image_append_list);
break;
case MENU_LABEL_SCREEN_RESOLUTION:
BIND_ACTION_OK(cbs, action_ok_video_resolution);
break;
default:
return -1;
}
}
return -1;
return 0;
}
static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
const char *label,
const char *menu_label, unsigned type)
uint32_t label_hash, uint32_t menu_label_hash, unsigned type)
{
if (type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD ||
type == MENU_SETTINGS_CUSTOM_BIND)
@ -4384,15 +4310,11 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
BIND_ACTION_OK(cbs, action_ok_push_default);
break;
case FILE_TYPE_PLAYLIST_ENTRY:
if (string_is_equal(
menu_label, msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION)) ||
string_is_equal(
menu_label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)))
if (label_hash == MENU_LABEL_COLLECTION)
{
BIND_ACTION_OK(cbs, action_ok_playlist_entry_collection);
}
else if (string_is_equal(
menu_label, msg_hash_to_str(MENU_ENUM_LABEL_RDB_ENTRY_START_CONTENT)))
else if (label_hash == MENU_LABEL_RDB_ENTRY_START_CONTENT)
{
BIND_ACTION_OK(cbs, action_ok_playlist_entry_start_content);
}
@ -4455,15 +4377,17 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
BIND_ACTION_OK(cbs, action_ok_scan_file);
#endif
}
else if (string_is_equal(
menu_label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES)))
{
BIND_ACTION_OK(cbs,
action_ok_compressed_archive_push_detect_core);
}
else
{
BIND_ACTION_OK(cbs, action_ok_compressed_archive_push);
switch (menu_label_hash)
{
case MENU_LABEL_FAVORITES:
BIND_ACTION_OK(cbs, action_ok_compressed_archive_push_detect_core);
break;
default:
BIND_ACTION_OK(cbs, action_ok_compressed_archive_push);
break;
}
}
break;
case FILE_TYPE_CORE:
@ -4479,20 +4403,20 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
break;
}
}
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)))
else
{
BIND_ACTION_OK(cbs, action_ok_load_core);
}
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_LIST)))
{
BIND_ACTION_OK(cbs, action_ok_load_core_deferred);
}
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET)))
{
BIND_ACTION_OK(cbs, action_ok_core_deferred_set);
switch (menu_label_hash)
{
case MENU_LABEL_DEFERRED_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_load_core_deferred);
break;
case MENU_LABEL_DEFERRED_CORE_LIST_SET:
BIND_ACTION_OK(cbs, action_ok_core_deferred_set);
break;
case MENU_LABEL_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_load_core);
break;
}
}
break;
case FILE_TYPE_DOWNLOAD_CORE_CONTENT:
@ -4516,20 +4440,15 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
case FILE_TYPE_DOWNLOAD_CORE_INFO:
break;
case FILE_TYPE_RDB:
if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)))
switch (menu_label_hash)
{
BIND_ACTION_OK(cbs, action_ok_database_manager_list);
}
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST)))
{
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
}
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DATABASE_MANAGER_LIST)))
{
BIND_ACTION_OK(cbs, action_ok_database_manager_list);
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
break;
case MENU_LABEL_DATABASE_MANAGER_LIST:
case MENU_VALUE_HORIZONTAL_MENU:
BIND_ACTION_OK(cbs, action_ok_database_manager_list);
break;
}
break;
case FILE_TYPE_RDB_ENTRY:
@ -4542,15 +4461,14 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
BIND_ACTION_OK(cbs, action_ok_netplay_lan_scan);
break;
case FILE_TYPE_CURSOR:
if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST)))
switch (menu_label_hash)
{
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
}
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_CURSOR_MANAGER_LIST)))
{
BIND_ACTION_OK(cbs, action_ok_cursor_manager_list);
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
break;
case MENU_LABEL_CURSOR_MANAGER_LIST:
BIND_ACTION_OK(cbs, action_ok_cursor_manager_list);
break;
}
break;
case FILE_TYPE_VIDEOFILTER:
@ -4601,31 +4519,33 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
break;
}
}
else if (
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST)) ||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES)) ||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE))
)
{
#ifdef HAVE_COMPRESSION
if (type == FILE_TYPE_IN_CARCHIVE)
{
BIND_ACTION_OK(cbs, action_ok_file_load_with_detect_core_carchive);
}
else
#endif
if (filebrowser_get_type() == FILEBROWSER_APPEND_IMAGE)
{
BIND_ACTION_OK(cbs, action_ok_disk_image_append);
}
else
{
BIND_ACTION_OK(cbs, action_ok_file_load_with_detect_core);
}
}
else
{
BIND_ACTION_OK(cbs, action_ok_file_load);
switch (menu_label_hash)
{
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
case MENU_LABEL_FAVORITES:
case MENU_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE:
#ifdef HAVE_COMPRESSION
if (type == FILE_TYPE_IN_CARCHIVE)
{
BIND_ACTION_OK(cbs, action_ok_file_load_with_detect_core_carchive);
}
else
#endif
if (filebrowser_get_type() == FILEBROWSER_APPEND_IMAGE)
{
BIND_ACTION_OK(cbs, action_ok_disk_image_append);
}
else
{
BIND_ACTION_OK(cbs, action_ok_file_load_with_detect_core);
}
break;
default:
BIND_ACTION_OK(cbs, action_ok_file_load);
break;
}
}
break;
case FILE_TYPE_MOVIE:
@ -4664,18 +4584,18 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
}
int menu_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
const char *path, const char *menu_label,
const char *label, unsigned type, size_t idx)
const char *path, const char *label, unsigned type, size_t idx,
uint32_t label_hash, uint32_t menu_label_hash)
{
if (!cbs)
return -1;
BIND_ACTION_OK(cbs, action_ok_lookup_setting);
if (menu_cbs_init_bind_ok_compare_label(cbs, label) == 0)
if (menu_cbs_init_bind_ok_compare_label(cbs, label, label_hash) == 0)
return 0;
if (menu_cbs_init_bind_ok_compare_type(cbs, label, menu_label, type) == 0)
if (menu_cbs_init_bind_ok_compare_type(cbs, label_hash, menu_label_hash, type) == 0)
return 0;
return -1;

View File

@ -71,12 +71,16 @@ int shader_action_parameter_right(unsigned type, const char *label, bool wraparo
video_shader_driver_get_current_shader(&shader_info);
param = &shader_info.data->parameters[type - MENU_SETTINGS_SHADER_PARAMETER_0];
if (!param)
return menu_cbs_exit();
generic_shader_action_parameter_right(param, type, label, wraparound);
param = menu_shader_manager_get_parameters(
type - MENU_SETTINGS_SHADER_PARAMETER_0);
return generic_shader_action_parameter_right(param, type, label, wraparound);
}
int shader_action_parameter_preset_right(unsigned type, const char *label,
bool wraparound)
{
struct video_shader_parameter *param = menu_shader_manager_get_parameters(
type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0);
if (!param)
return menu_cbs_exit();
return generic_shader_action_parameter_right(param, type, label, wraparound);
@ -477,7 +481,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
{
BIND_ACTION_RIGHT(cbs, shader_action_parameter_right);
BIND_ACTION_RIGHT(cbs, shader_action_parameter_preset_right);
}
#endif
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
@ -571,7 +575,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
}
static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
const char *label, const char *menu_label)
const char *label, uint32_t label_hash, const char *menu_label)
{
if (cbs->setting)
@ -591,12 +595,15 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
unsigned i;
for (i = 0; i < MAX_USERS; i++)
{
uint32_t label_setting_hash;
char label_setting[128];
label_setting[0] = '\0';
snprintf(label_setting, sizeof(label_setting), "input_player%d_joypad_index", i + 1);
label_setting_hash = msg_hash_calculate(label_setting);
if (!string_is_equal(label, label_setting))
if (label_hash != label_setting_hash)
continue;
BIND_ACTION_RIGHT(cbs, bind_right_generic);
@ -703,7 +710,8 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
int menu_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *menu_label)
const char *menu_label,
uint32_t label_hash)
{
if (!cbs)
return menu_cbs_exit();
@ -730,7 +738,8 @@ int menu_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
}
}
if (menu_cbs_init_bind_right_compare_label(cbs, label, menu_label) == 0)
if (menu_cbs_init_bind_right_compare_label(cbs, label, label_hash, menu_label
) == 0)
return 0;
if (menu_cbs_init_bind_right_compare_type(cbs, type, menu_label ) == 0)

View File

@ -153,9 +153,9 @@ static int action_scan_input_desc(const char *path,
static int menu_cbs_init_bind_scan_compare_type(menu_file_list_cbs_t *cbs,
unsigned type)
{
switch (type)
{
#if 0
#ifdef HAVE_LIBRETRODB
case FILE_TYPE_DIRECTORY:
BIND_ACTION_SCAN(cbs, action_scan_directory);
@ -164,7 +164,6 @@ static int menu_cbs_init_bind_scan_compare_type(menu_file_list_cbs_t *cbs,
case FILE_TYPE_PLAIN:
BIND_ACTION_SCAN(cbs, action_scan_file);
return 0;
#endif
#endif
case FILE_TYPE_RPL_ENTRY:
BIND_ACTION_SCAN(cbs, action_switch_thumbnail);

View File

@ -132,7 +132,7 @@ static int shader_action_parameter_select(const char *path, const char *label, u
static int shader_action_parameter_preset_select(const char *path, const char *label, unsigned type,
size_t idx)
{
return shader_action_parameter_right(type, label, true);
return shader_action_parameter_preset_right(type, label, true);
}
#endif

View File

@ -16,7 +16,6 @@
#include <compat/strl.h>
#include <file/file_path.h>
#include <lists/string_list.h>
#include <string/stdstring.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
@ -135,7 +134,12 @@ static int action_start_shader_action_parameter(unsigned type, const char *label
#endif
unsigned parameter = type - MENU_SETTINGS_SHADER_PARAMETER_0;
return 0;
}
static int action_start_shader_action_preset_parameter(unsigned type, const char *label)
{
unsigned parameter = type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0;
return menu_shader_manager_clear_parameter(parameter);
}
@ -270,15 +274,8 @@ static int action_start_lookup_setting(unsigned type, const char *label)
return menu_setting_set(type, label, MENU_ACTION_START, false);
}
static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs,
const char *label)
static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
{
if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SCREEN_RESOLUTION)))
{
BIND_ACTION_START(cbs, action_start_video_resolution);
return 0;
}
if (cbs->enum_idx != MSG_UNKNOWN)
{
switch (cbs->enum_idx)
@ -332,7 +329,7 @@ static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
{
BIND_ACTION_START(cbs, action_start_shader_action_parameter);
BIND_ACTION_START(cbs, action_start_shader_action_preset_parameter);
}
else if (type >= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN &&
type <= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_END)
@ -357,6 +354,10 @@ static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
{
BIND_ACTION_START(cbs, action_start_core_setting);
}
else if (type == MENU_LABEL_SCREEN_RESOLUTION)
{
BIND_ACTION_START(cbs, action_start_video_resolution);
}
else
return -1;
@ -371,7 +372,7 @@ int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
BIND_ACTION_START(cbs, action_start_lookup_setting);
if (menu_cbs_init_bind_start_compare_label(cbs, label) == 0)
if (menu_cbs_init_bind_start_compare_label(cbs) == 0)
return 0;
if (menu_cbs_init_bind_start_compare_type(cbs, type) == 0)

View File

@ -358,7 +358,6 @@ default_sublabel_macro(action_bind_sublabel_shader_num_passes,
default_sublabel_macro(action_bind_sublabel_shader_preset, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET)
default_sublabel_macro(action_bind_sublabel_shader_preset_save_as, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS)
default_sublabel_macro(action_bind_sublabel_shader_preset_save_core, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE)
default_sublabel_macro(action_bind_sublabel_shader_preset_save_parent, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT)
default_sublabel_macro(action_bind_sublabel_shader_preset_save_game, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GAME)
default_sublabel_macro(action_bind_sublabel_shader_parameters, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS)
default_sublabel_macro(action_bind_sublabel_shader_preset_parameters, MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_PARAMETERS)
@ -506,9 +505,6 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_shader_preset_save_core);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_shader_preset_save_parent);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_shader_preset_save_game);
break;

File diff suppressed because it is too large Load Diff

View File

@ -29,62 +29,29 @@
#include "../../content.h"
#include "../../retroarch.h"
struct menu_generic_iterate_type
static enum action_iterate_type action_iterate_type(uint32_t hash)
{
enum msg_hash_enums id;
enum action_iterate_type type;
};
static struct menu_generic_iterate_type iterate_lbl_list[] = {
switch (hash)
{
MENU_ENUM_LABEL_HELP,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_CONTROLS,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_WHAT_IS_A_CORE,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_LOADING_CONTENT,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_CHEEVOS_DESCRIPTION,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_HELP_SCANNING_CONTENT,
ITERATE_TYPE_HELP
},
{
MENU_ENUM_LABEL_INFO_SCREEN,
ITERATE_TYPE_INFO
},
{
MENU_ENUM_LABEL_CUSTOM_BIND,
ITERATE_TYPE_BIND
},
{
MENU_ENUM_LABEL_CUSTOM_BIND_ALL,
ITERATE_TYPE_BIND
},
{
MENU_ENUM_LABEL_CUSTOM_BIND_DEFAULTS,
ITERATE_TYPE_BIND
case MENU_LABEL_HELP:
case MENU_LABEL_HELP_CONTROLS:
case MENU_LABEL_HELP_WHAT_IS_A_CORE:
case MENU_LABEL_HELP_LOADING_CONTENT:
case MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD:
case MENU_LABEL_CHEEVOS_DESCRIPTION:
case MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
case MENU_LABEL_HELP_SCANNING_CONTENT:
return ITERATE_TYPE_HELP;
case MENU_LABEL_INFO_SCREEN:
return ITERATE_TYPE_INFO;
case MENU_LABEL_CUSTOM_BIND:
case MENU_LABEL_CUSTOM_BIND_ALL:
case MENU_LABEL_CUSTOM_BIND_DEFAULTS:
return ITERATE_TYPE_BIND;
}
};
return ITERATE_TYPE_DEFAULT;
}
/**
* menu_iterate:
@ -99,13 +66,14 @@ static struct menu_generic_iterate_type iterate_lbl_list[] = {
**/
int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
{
enum action_iterate_type iterate_type = ITERATE_TYPE_DEFAULT;
unsigned file_type = 0;
int ret = 0;
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
const char *label = NULL;
menu_handle_t *menu = (menu_handle_t*)data;
size_t selection = menu_navigation_get_selection();
enum action_iterate_type iterate_type;
unsigned file_type = 0;
int ret = 0;
uint32_t hash = 0;
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
const char *label = NULL;
menu_handle_t *menu = (menu_handle_t*)data;
size_t selection = menu_navigation_get_selection();
menu_entries_get_last_stack(NULL, &label, &file_type, &enum_idx, NULL);
@ -115,17 +83,8 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
menu->menu_state_msg[0] = '\0';
if (!string_is_empty(label))
{
unsigned k;
for (k = 0; k < ARRAY_SIZE(iterate_lbl_list); k++)
{
if (string_is_equal(label, msg_hash_to_str(iterate_lbl_list[k].id)))
{
iterate_type = iterate_lbl_list[k].type;
break;
}
}
}
hash = msg_hash_calculate(label);
iterate_type = action_iterate_type(hash);
menu_driver_set_binding_state(iterate_type == ITERATE_TYPE_BIND);

View File

@ -2936,19 +2936,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
strlcpy(title_truncated, xmb->title_name, sizeof(title_truncated));
if (selection > 1)
{
/* skip 25 utf8 multi-byte chars */
char* end = title_truncated;
for(i = 0; i < 25 && *end; i++)
{
end++;
while((*end & 0xC0) == 0x80)
end++;
}
*end = '\0';
}
title_truncated[25] = '\0';
/* Title text */
xmb_draw_text(menu_disp_info, xmb,

View File

@ -24,15 +24,13 @@
#define DEBUG_LOG
#endif
#ifdef DEBUG_LOG
static void menu_cbs_init_log(const char *entry_label, const char *bind_label, const char *label)
{
#ifdef DEBUG_LOG
if (!string_is_empty(label))
RARCH_LOG("[%s]\t\t\tFound %s bind : [%s]\n", entry_label, bind_label, label);
}
#else
#define menu_cbs_init_log(a, b, c)
#endif
}
struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END] =
{
@ -211,28 +209,35 @@ void menu_cbs_init(void *data,
menu_ctx_bind_t bind_info;
const char *repr_label = NULL;
const char *menu_label = NULL;
uint32_t label_hash = 0;
uint32_t menu_label_hash = 0;
enum msg_hash_enums enum_idx = MSG_UNKNOWN;
file_list_t *list = (file_list_t*)data;
if (!list || !label)
if (!list)
return;
menu_entries_get_last_stack(NULL, &menu_label, NULL, &enum_idx, NULL);
if (!menu_label)
if (!label || !menu_label)
return;
label_hash = msg_hash_calculate(label);
menu_label_hash = msg_hash_calculate(menu_label);
#ifdef DEBUG_LOG
RARCH_LOG("\n");
#endif
repr_label = (!string_is_empty(label)) ? label : path;
#ifdef DEBUG_LOG
if (cbs && cbs->enum_idx != MSG_UNKNOWN)
RARCH_LOG("\t\t\tenum_idx %d [%s]\n", cbs->enum_idx, msg_hash_to_str(cbs->enum_idx));
repr_label = (!string_is_empty(label)) ? label : path;
#endif
/* It will try to find a corresponding callback function inside
* menu_cbs_ok.c, then map this callback to the entry. */
menu_cbs_init_bind_ok(cbs, path, menu_label,
label, type, idx);
menu_cbs_init_bind_ok(cbs, path, label, type, idx, label_hash, menu_label_hash);
menu_cbs_init_log(repr_label, "OK", cbs->action_ok_ident);
@ -286,19 +291,19 @@ void menu_cbs_init(void *data,
/* It will try to find a corresponding callback function inside
* menu_cbs_left.c, then map this callback to the entry. */
menu_cbs_init_bind_left(cbs, path, label, type, idx, menu_label);
menu_cbs_init_bind_left(cbs, path, label, type, idx, menu_label, label_hash);
menu_cbs_init_log(repr_label, "LEFT", cbs->action_left_ident);
/* It will try to find a corresponding callback function inside
* menu_cbs_right.c, then map this callback to the entry. */
menu_cbs_init_bind_right(cbs, path, label, type, idx, menu_label);
menu_cbs_init_bind_right(cbs, path, label, type, idx, menu_label, label_hash);
menu_cbs_init_log(repr_label, "RIGHT", cbs->action_right_ident);
/* It will try to find a corresponding callback function inside
* menu_cbs_deferred_push.c, then map this callback to the entry. */
menu_cbs_init_bind_deferred_push(cbs, path, label, type, idx);
menu_cbs_init_bind_deferred_push(cbs, path, label, type, idx, label_hash);
menu_cbs_init_log(repr_label, "DEFERRED PUSH", cbs->action_deferred_push_ident);
@ -316,7 +321,7 @@ void menu_cbs_init(void *data,
/* It will try to find a corresponding callback function inside
* menu_cbs_title.c, then map this callback to the entry. */
menu_cbs_init_bind_title(cbs, path, label, type, idx);
menu_cbs_init_bind_title(cbs, path, label, type, idx, label_hash);
menu_cbs_init_log(repr_label, "GET TITLE", cbs->action_get_title_ident);
@ -337,6 +342,7 @@ void menu_cbs_init(void *data,
bind_info.label = label;
bind_info.type = type;
bind_info.idx = idx;
bind_info.label_hash = label_hash;
menu_driver_ctl(RARCH_MENU_CTL_BIND_INIT, &bind_info);
}

View File

@ -141,6 +141,9 @@ int action_refresh_default(file_list_t *list, file_list_t *menu_list);
int shader_action_parameter_right(unsigned type, const char *label, bool wraparound);
int shader_action_parameter_preset_right(unsigned type, const char *label,
bool wraparound);
int generic_action_ok_displaylist_push(const char *path, const char *new_path,
const char *label, unsigned type, size_t idx, size_t entry_idx,
unsigned action_type);
@ -173,11 +176,13 @@ int action_right_cheat(unsigned type, const char *label,
int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *menu_label);
const char *menu_label,
uint32_t label_hash);
int menu_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx,
const char *menu_label);
const char *menu_label,
uint32_t label_hash);
int menu_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
@ -210,11 +215,12 @@ int menu_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
int menu_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
const char *path, const char *menu_label,
const char *label, unsigned type, size_t idx);
const char *path, const char *label, unsigned type, size_t idx,
uint32_t label_hash, uint32_t menu_label_hash);
int menu_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
const char *path, const char *label, unsigned type, size_t idx,
uint32_t label_hash);
int menu_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
@ -223,7 +229,8 @@ int menu_cbs_init_bind_scan(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx);
const char *path, const char *label, unsigned type, size_t idx,
uint32_t label_hash);
#ifdef HAVE_LIBRETRODB
int action_scan_directory(const char *path,

View File

@ -1274,13 +1274,19 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
for (i = 0; i < list_size; i++)
{
char *path_copy = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
char *fill_buf = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
const char *core_name = NULL;
const char *path = NULL;
const char *label = NULL;
fill_buf[0] = '\0';
fill_buf[0] = path_copy[0] = '\0';
if (!string_is_empty(info->path))
strlcpy(path_copy, info->path, path_size);
path = path_copy;
playlist_get_index(playlist, i,
&path, &label, NULL, &core_name, NULL, NULL);
@ -1297,9 +1303,8 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
menu_driver_set_thumbnail_content(content_basename, strlen(content_basename) + 1);
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_PATH, NULL);
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_THUMBNAIL_IMAGE, NULL);
free(content_basename);
}
free(content_basename);
}
if (path)
@ -1344,6 +1349,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
menu_entries_append_enum(info->list, label,
path, MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_RPL_ENTRY, 0, i);
free(path_copy);
free(fill_buf);
}
@ -1384,17 +1390,12 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info)
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE,
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT,
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME,
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
@ -1402,6 +1403,11 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info)
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS),
MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS,
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_PARAMETERS),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS,
MENU_SETTING_ACTION, 0, 0);
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES),
@ -4073,6 +4079,8 @@ bool menu_displaylist_process(menu_displaylist_info_t *info)
MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
MENU_INFO_MESSAGE, 0, 0);
if (!string_is_empty(info->label))
info->label_hash = msg_hash_calculate(info->label);
menu_driver_populate_entries(info);
ui_companion_driver_notify_list_loaded(info->list, info->menu_list);
}
@ -4118,6 +4126,7 @@ void menu_displaylist_info_init(menu_displaylist_info_t *info)
info->type = 0;
info->type_default = 0;
info->flags = 0;
info->label_hash = 0;
info->directory_ptr = 0;
info->label = NULL;
info->path = NULL;

View File

@ -194,6 +194,7 @@ typedef struct menu_displaylist_info
unsigned type;
unsigned type_default;
unsigned flags;
uint32_t label_hash;
size_t directory_ptr;
file_list_t *list;
file_list_t *menu_list;

View File

@ -553,6 +553,7 @@ typedef struct menu_ctx_bind
const char *path;
const char *label;
unsigned type;
uint32_t label_hash;
size_t idx;
int retcode;
menu_file_list_cbs_t *cbs;

View File

@ -605,7 +605,6 @@ static void setting_get_string_representation_uint_user_language(void *data,
modes[RETRO_LANGUAGE_ESPERANTO] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_ESPERANTO);
modes[RETRO_LANGUAGE_POLISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_POLISH);
modes[RETRO_LANGUAGE_VIETNAMESE] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_VIETNAMESE);
modes[RETRO_LANGUAGE_ARABIC] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_ARABIC);
strlcpy(s, modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], len);
}
@ -821,14 +820,19 @@ int menu_action_handle_setting(rarch_setting_t *setting,
static rarch_setting_t *menu_setting_find_internal(rarch_setting_t *setting,
const char *label)
{
uint32_t needle = msg_hash_calculate(label);
rarch_setting_t **list = &setting;
for (; setting_get_type(setting) != ST_NONE; (*list = *list + 1))
{
if (string_is_equal(label, setting->name)
if ( (needle == setting->name_hash)
&& (setting_get_type(setting) <= ST_GROUP))
{
const char *name = setting->name;
const char *short_description = setting->short_description;
/* make sure this isn't a collision */
if (!string_is_equal(label, name))
continue;
if (string_is_empty(short_description))
return NULL;
@ -7787,6 +7791,7 @@ static void menu_setting_terminate_last(rarch_setting_t *list, unsigned pos)
(*&list)[pos].type = ST_NONE;
(*&list)[pos].size = 0;
(*&list)[pos].name = NULL;
(*&list)[pos].name_hash = 0;
(*&list)[pos].short_description = NULL;
(*&list)[pos].group = NULL;
(*&list)[pos].subgroup = NULL;

View File

@ -30,7 +30,6 @@
#include "../file_path_special.h"
#include "../configuration.h"
#include "../paths.h"
#include "../retroarch.h"
#include "../verbosity.h"
#ifdef HAVE_SHADER_MANAGER
@ -131,14 +130,14 @@ bool menu_shader_manager_init(void)
#ifdef HAVE_SHADER_MANAGER
settings_t *settings = config_get_ptr();
const char *config_path = path_get(RARCH_PATH_CONFIG);
const char *path_shader = retroarch_get_shader_preset();
const char *path_shader = settings->paths.path_shader;
menu_shader_manager_free();
menu_driver_shader = (struct video_shader*)
calloc(1, sizeof(struct video_shader));
if (!menu_driver_shader || !path_shader)
if (!menu_driver_shader)
return false;
/* In a multi-config setting, we can't have
@ -249,7 +248,7 @@ bool menu_shader_manager_init(void)
*
* Sets shader preset.
**/
bool menu_shader_manager_set_preset(void *data,
void menu_shader_manager_set_preset(void *data,
unsigned type, const char *preset_path)
{
#ifdef HAVE_SHADER_MANAGER
@ -261,7 +260,7 @@ bool menu_shader_manager_set_preset(void *data,
if (!video_driver_set_shader((enum rarch_shader_type)type, preset_path))
{
configuration_set_bool(settings, settings->bools.video_shader_enable, false);
return false;
return;
}
/* Makes sure that we use Menu Preset shader on driver reinit.
@ -272,7 +271,7 @@ bool menu_shader_manager_set_preset(void *data,
configuration_set_bool(settings, settings->bools.video_shader_enable, true);
if (!preset_path || !shader)
return false;
return;
/* Load stored Preset into menu on success.
* Used when a preset is directly loaded.
@ -281,7 +280,7 @@ bool menu_shader_manager_set_preset(void *data,
conf = config_file_new(preset_path);
if (!conf)
return false;
return;
RARCH_LOG("Setting Menu shader: %s.\n", preset_path);
@ -293,8 +292,6 @@ bool menu_shader_manager_set_preset(void *data,
config_file_free(conf);
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
return true;
#endif
}

View File

@ -48,7 +48,7 @@ bool menu_shader_manager_init(void);
*
* Sets shader preset.
**/
bool menu_shader_manager_set_preset(
void menu_shader_manager_set_preset(
void *data, unsigned type, const char *preset_path);
/**

View File

@ -1738,6 +1738,236 @@ enum msg_hash_enums
MSG_LAST
};
/* Callback strings */
#define CB_CORE_UPDATER_DOWNLOAD 0x7412da7dU
#define CB_UPDATE_ASSETS 0xbf85795eU
/* Deferred */
#define MENU_LABEL_DEFERRED_THUMBNAILS_UPDATER_LIST 0x364dfa2bU
#define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U
#define MENU_LABEL_DEFERRED_CORE_LIST_SET 0xa6d5fdb4U
#define MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST 0x7c0b704fU
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST 0x45446638U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER 0xcbd89be5U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER 0x125e594dU
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN 0x4ebaa767U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE 0x77f9eff2U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING 0x1c7f8a43U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE 0xaaeebde7U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING 0xbf7ff5e7U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW 0x9866bda3U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH 0x2b36ce66U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR 0x9c7c6e91U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING 0x68eba20fU
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING 0x8bf6ab18U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING 0x5fc77328U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING 0x24f6172cU
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING 0x0a8e67f0U
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS 0xbfcba816U
#define MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL 0xc35416c0U
#define MENU_LABEL_DEFERRED_RPL_ENTRY_ACTIONS 0x358a7494U
#define MENU_LABEL_DEFERRED_CORE_LIST 0xf157d289U
#define MENU_LABEL_DEFERRED_CORE_UPDATER_LIST 0xc315f682U
#define MENU_LABEL_DEFERRED_DRIVER_SETTINGS_LIST 0xaa5efefcU
#define MENU_LABEL_DEFERRED_VIDEO_SETTINGS_LIST 0x83c65827U
#define MENU_LABEL_DEFERRED_AUDIO_SETTINGS_LIST 0x5bba25e2U
#define MENU_LABEL_DEFERRED_RECORDING_SETTINGS_LIST 0x05548d52U
#define MENU_LABEL_DEFERRED_PLAYLIST_SETTINGS_LIST 0x9518e0c7U
#define MENU_LABEL_DEFERRED_INPUT_SETTINGS_LIST 0x050bec60U
#define MENU_LABEL_DEFERRED_USER_BINDS_LIST 0x28c5750eU
#define MENU_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST 0x1322324cU
#define MENU_LABEL_DEFERRED_ACCOUNTS_LIST 0x3d2b8860U
#define MENU_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE 0xdc9c0064U
#define MENU_LABEL_DEFERRED_ARCHIVE_ACTION 0x7faf0284U
#define MENU_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE 0xd9452498U
#define MENU_LABEL_DEFERRED_ARCHIVE_OPEN 0xfa0938b8U
#define MENU_LABEL_DEFERRED_CORE_CONTENT_LIST 0x76150c63U
#define MENU_LABEL_DEFERRED_LAKKA_LIST 0x3db437c4U
#define MENU_LABEL_DEFERRED_INPUT_HOTKEY_BINDS_LIST 0x10b41d97U
#define MENU_LABEL_DEFERRED_CONFIGURATIONS_LIST 0x679a1b0bU
#define MENU_LABEL_DEFERRED_BROWSE_URL_START 0xcef58296U
/* Cheevos settings */
#define MENU_LABEL_CHEEVOS_DESCRIPTION 0x7e00e0f5U
/* Accounts settings */
#define MENU_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS 0xe6b7c16cU
#define MENU_LABEL_ACCOUNTS_LIST 0x774c15a0U
#define MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST 0xb4f82700U
/* Online updater settings */
#define MENU_LABEL_UPDATE_LAKKA 0x19b51eebU
/* Information settings */
#define MENU_LABEL_INFORMATION_LIST 0x225e7606U
#define MENU_LABEL_CONTENT_SETTINGS 0xe789f7f6U
#define MENU_LABEL_SCREEN_RESOLUTION 0x5c9b3a58U
/* Menu settings */
#define MENU_LABEL_XMB_FONT 0x0ECA56CA2
#define MENU_LABEL_PERFCNT_ENABLE 0x6823dbddU
/* Video settings */
#define MENU_LABEL_VIDEO_FONT_PATH 0xd0de729eU
#define MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS 0x3d6e5ce5U
#define MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER 0x4468cb1bU
#define MENU_LABEL_VIDEO_SHADER_NUM_PASSES 0x79b2992fU
#define MENU_LABEL_VIDEO_SHADER_PARAMETERS 0x9895c3e5U
#define MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS 0xd18158d7U
#define MENU_LABEL_VIDEO_SHADER_PASS 0x4fa31028U
#define MENU_LABEL_VIDEO_SHADER_PRESET 0xc5d3bae4U
/* Input settings */
#define MENU_LABEL_INPUT_OVERLAY 0x24e24796U
#define MENU_LABEL_INPUT_OSK_OVERLAY 0x11f1c582U
/* Record settings */
#define MENU_LABEL_RECORD_CONFIG 0x11c3daf9U
/* Cheat options */
#define MENU_LABEL_CHEAT_DATABASE_PATH 0x01388b8aU
#define MENU_LABEL_CHEAT_FILE_LOAD 0x57336148U
#define MENU_LABEL_CHEAT_FILE_SAVE_AS 0x1f58dccaU
#define MENU_LABEL_CHEAT_APPLY_CHANGES 0xde88aa27U
/* Disk settings */
#define MENU_LABEL_DISK_OPTIONS 0xc61ab5fbU
#define MENU_LABEL_DISK_IMAGE_APPEND 0x5af7d709U
/* Menu settings */
#define MENU_LABEL_MENU_WALLPAPER 0x3b84de01U
#define MENU_LABEL_MENU_SETTINGS 0x61e4544bU
/* Directory settings */
#define MENU_LABEL_CURSOR_DIRECTORY 0xdee8d377U
#define MENU_LABEL_OSK_OVERLAY_DIRECTORY 0xcce86287U
#define MENU_LABEL_JOYPAD_AUTOCONFIG_DIR 0x2f4822d8U
#define MENU_LABEL_RECORDING_OUTPUT_DIRECTORY 0x30bece06U
#define MENU_LABEL_RECORDING_CONFIG_DIRECTORY 0x3c3f274bU
#define MENU_LABEL_LIBRETRO_DIR_PATH 0x1af1eb72U
#define MENU_LABEL_AUDIO_FILTER_DIR 0x4bd96ebaU
#define MENU_LABEL_VIDEO_SHADER_DIR 0x30f53b10U
#define MENU_LABEL_VIDEO_FILTER_DIR 0x67603f1fU
#define MENU_LABEL_SCREENSHOT_DIRECTORY 0x552612d7U
#define MENU_LABEL_SYSTEM_DIRECTORY 0x35a6fb9eU
#define MENU_LABEL_INPUT_REMAPPING_DIRECTORY 0x5233c20bU
#define MENU_LABEL_OVERLAY_DIRECTORY 0xc4ed3d1bU
#define MENU_LABEL_SAVEFILE_DIRECTORY 0x92773488U
#define MENU_LABEL_SAVESTATE_DIRECTORY 0x90551289U
#define MENU_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY 0x62f975b8U
#define MENU_LABEL_THUMBNAILS_DIRECTORY 0xdea77410U
#define MENU_LABEL_RGUI_BROWSER_DIRECTORY 0xa86cba73U
#define MENU_LABEL_CONTENT_DATABASE_DIRECTORY 0x6b443f80U
#define MENU_LABEL_PLAYLIST_DIRECTORY 0x6361820bU
#define MENU_LABEL_CORE_ASSETS_DIRECTORY 0x8ba5ee54U
#define MENU_LABEL_CONTENT_DIRECTORY 0x7738dc14U
#define MENU_LABEL_RGUI_CONFIG_DIRECTORY 0x0cb3e005U
#define MENU_LABEL_ASSETS_DIRECTORY 0xde1ae8ecU
#define MENU_LABEL_CACHE_DIRECTORY 0x851dfb8dU
/* RDB settings */
#define MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE 0x8888c5acU
#define MENU_LABEL_RDB_ENTRY_START_CONTENT 0x95025a55U
#define MENU_LABEL_RDB_ENTRY_PUBLISHER 0x4d7bcdfbU
#define MENU_LABEL_RDB_ENTRY_DEVELOPER 0x06f61093U
#define MENU_LABEL_RDB_ENTRY_ORIGIN 0xb176aad5U
#define MENU_LABEL_RDB_ENTRY_FRANCHISE 0xb31764a0U
#define MENU_LABEL_RDB_ENTRY_ENHANCEMENT_HW 0x79ee4f11U
#define MENU_LABEL_RDB_ENTRY_ESRB_RATING 0xe138fa3dU
#define MENU_LABEL_RDB_ENTRY_BBFC_RATING 0x82dbc01eU
#define MENU_LABEL_RDB_ENTRY_ELSPA_RATING 0x0def0906U
#define MENU_LABEL_RDB_ENTRY_PEGI_RATING 0xd814cb56U
#define MENU_LABEL_RDB_ENTRY_CERO_RATING 0x9d436f5aU
#define MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_RATING 0x9735f631U
#define MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_ISSUE 0xd5706415U
#define MENU_LABEL_RDB_ENTRY_FAMITSU_MAGAZINE_RATING 0x01a50315U
#define MENU_LABEL_RDB_ENTRY_RELEASE_MONTH 0xad2f2c54U
#define MENU_LABEL_RDB_ENTRY_RELEASE_YEAR 0x14c9c6bfU
#define MENU_LABEL_RDB_ENTRY_MAX_USERS 0xfae91cc4U
#define MENU_LABEL_FAVORITES 0x67325138U
#define MENU_LABEL_DETECT_CORE_LIST 0xaa07c341U
#define MENU_LABEL_DETECT_CORE_LIST_OK 0xabba2a7aU
#define MENU_LABEL_CORE_LIST 0xa22bb14dU
#define MENU_LABEL_MANAGEMENT 0x2516c88aU
#define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U
#define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U
#define MENU_LABEL_ACHIEVEMENT_LIST 0x7b90fc49U
#define MENU_LABEL_CORE_INFORMATION 0xb638e0d3U
#define MENU_LABEL_CORE_OPTIONS 0xf65e60f9U
#define MENU_LABEL_SHADER_OPTIONS 0x1f7d2fc7U
#define MENU_LABEL_CORE_CHEAT_OPTIONS 0x9293171dU
#define MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS 0x7836a8caU
#define MENU_LABEL_DATABASE_MANAGER_LIST 0x7f853d8fU
#define MENU_LABEL_CURSOR_MANAGER_LIST 0xa969e378U
#define MENU_LABEL_REMAP_FILE_LOAD 0x9c2799b8U
#define MENU_LABEL_INFO_SCREEN 0xd97853d0U
#define MENU_LABEL_CUSTOM_RATIO 0xf038731eU
#define MENU_LABEL_PAL60_ENABLE 0x62bc416eU
#define MENU_LABEL_CONTENT_HISTORY_PATH 0x6f22fb9dU
#define MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS 0xa6de9ba6U
#define MENU_LABEL_SHADER_APPLY_CHANGES 0x4f7306b9U
#define MENU_LABEL_CUSTOM_BIND 0x1e84b3fcU
#define MENU_LABEL_CUSTOM_BIND_ALL 0x79ac14f4U
#define MENU_LABEL_CUSTOM_BIND_DEFAULTS 0xe88f7b13U
#define MENU_LABEL_CONFIGURATIONS 0x3e930a50U
#define MENU_LABEL_REMAP_FILE_SAVE_CORE 0x7c9d4c8fU
#define MENU_LABEL_REMAP_FILE_SAVE_GAME 0x7c9f41e0U
#define MENU_LABEL_CONTENT_COLLECTION_LIST 0x32d1df83U
#define MENU_LABEL_COLLECTION 0x5fea5991U
#define MENU_LABEL_OPEN_ARCHIVE 0x78c0ca58U
#define MENU_LABEL_OPEN_ARCHIVE_DETECT_CORE 0x92442638U
#define MENU_LABEL_LOAD_ARCHIVE_DETECT_CORE 0x681f2f46U
#define MENU_LABEL_LOAD_ARCHIVE 0xc3834e66U
/* Help */
#define MENU_LABEL_LIBRETRO_INFO_PATH 0xe552b25fU
#define MENU_LABEL_INPUT_DRIVER_LINUXRAW 0xc33c6b9fU
#define MENU_LABEL_INPUT_DRIVER_UDEV 0x7c9eeeb9U
#define MENU_LABEL_AUDIO_DSP_PLUGIN 0x4a69572bU
#define MENU_LABEL_AUDIO_RESAMPLER_DRIVER_SINC 0x7c9dec52U
#define MENU_LABEL_AUDIO_RESAMPLER_DRIVER_CC 0x0059732bU
#define MENU_LABEL_VIDEO_FILTER 0x1c0eb741U
#define MENU_LABEL_HELP_CONTROLS 0x04859221U
#define MENU_LABEL_HELP_LIST 0x006af669U
#define MENU_LABEL_HELP_WHAT_IS_A_CORE 0x83fcbc44U
#define MENU_LABEL_HELP_LOADING_CONTENT 0x231d8245U
#define MENU_LABEL_HELP_SCANNING_CONTENT 0x1dec52b8U
#define MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD 0x6e66ef07U
#define MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING 0xd44d395cU
/* Main menu */
#define MENU_LABEL_LOAD_CONTENT_LIST 0x5745de1fU
#define MENU_LABEL_LOAD_CONTENT_HISTORY 0xfe1d79e5U
#define MENU_LABEL_ADD_CONTENT_LIST 0x046f4668U
#define MENU_LABEL_ONLINE_UPDATER 0xcac0025eU
#define MENU_LABEL_NETPLAY 0x0b511d22U
#define MENU_LABEL_SETTINGS 0x1304dc16U
#define MENU_LABEL_HELP 0x7c97d2eeU
#define MENU_VALUE_HORIZONTAL_MENU 0x35761704U
const char *msg_hash_to_str(enum msg_hash_enums msg);
const char *msg_hash_to_str_fr(enum msg_hash_enums msg);

View File

@ -618,6 +618,7 @@ static rarch_setting_t setting_action_setting(const char* name,
result.size = 0;
result.name = name;
result.name_hash = 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -680,6 +681,7 @@ static rarch_setting_t setting_group_setting(enum setting_type type, const char*
result.size = 0;
result.name = name;
result.name_hash = 0;
result.short_description = name;
result.group = NULL;
result.subgroup = NULL;
@ -753,6 +755,7 @@ static rarch_setting_t setting_float_setting(const char* name,
result.size = sizeof(float);
result.name = name;
result.name_hash = 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -829,6 +832,7 @@ static rarch_setting_t setting_uint_setting(const char* name,
result.size = sizeof(unsigned int);
result.name = name;
result.name_hash = 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -905,6 +909,7 @@ static rarch_setting_t setting_hex_setting(const char* name,
result.size = sizeof(unsigned int);
result.name = name;
result.name_hash = 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -982,6 +987,7 @@ static rarch_setting_t setting_bind_setting(const char* name,
result.size = 0;
result.name = name;
result.name_hash = 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -1141,6 +1147,7 @@ static rarch_setting_t setting_string_setting(enum setting_type type,
result.size = size;
result.name = name;
result.name_hash = 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -1262,6 +1269,7 @@ static rarch_setting_t setting_subgroup_setting(enum setting_type type,
result.size = 0;
result.name = name;
result.name_hash = 0;
result.short_description = name;
result.group = parent_name;
result.parent_group = parent_group;
@ -1336,6 +1344,7 @@ static rarch_setting_t setting_bool_setting(const char* name,
result.size = sizeof(bool);
result.name = name;
result.name_hash = name ? msg_hash_calculate(name) : 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -1414,6 +1423,7 @@ static rarch_setting_t setting_int_setting(const char* name,
result.size = sizeof(int);
result.name = name;
result.name_hash = name ? msg_hash_calculate(name) : 0;
result.short_description = short_description;
result.group = group;
result.subgroup = subgroup;
@ -1483,6 +1493,8 @@ bool CONFIG_BOOL_ALT(
if (!settings_list_append(list, list_info))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
if (flags != SD_FLAG_NONE)
settings_data_list_current_add_flags(list, list_info, flags);
@ -1517,6 +1529,8 @@ bool CONFIG_BOOL(
if (!settings_list_append(list, list_info))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
if (flags != SD_FLAG_NONE)
settings_data_list_current_add_flags(list, list_info, flags);
@ -1550,6 +1564,8 @@ bool CONFIG_INT(
false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
@ -1577,6 +1593,8 @@ bool CONFIG_UINT_ALT(
true);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
return true;
}
@ -1603,6 +1621,8 @@ bool CONFIG_UINT(
false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
@ -1631,6 +1651,8 @@ bool CONFIG_FLOAT(
false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
@ -1662,6 +1684,8 @@ bool CONFIG_PATH(
false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
#ifdef HAVE_MENU
@ -1694,6 +1718,8 @@ bool CONFIG_DIR(
false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
settings_data_list_current_add_flags(
list,
@ -1727,6 +1753,8 @@ bool CONFIG_STRING(
change_handler, read_handler, false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx);
@ -1756,6 +1784,8 @@ bool CONFIG_STRING_OPTIONS(
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
@ -1788,6 +1818,8 @@ bool CONFIG_HEX(
change_handler, read_handler, false);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
@ -1817,6 +1849,8 @@ bool CONFIG_BIND(
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
/* Request name and short description to be freed later */
settings_data_list_current_add_free_flags(list, list_info, SD_FREE_FLAG_NAME | SD_FREE_FLAG_SHORT);
@ -1842,6 +1876,8 @@ bool CONFIG_BIND_ALT(
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
/* Request name and short description to be freed later */
settings_data_list_current_add_free_flags(list, list_info, SD_FREE_FLAG_NAME | SD_FREE_FLAG_SHORT);
@ -1863,6 +1899,8 @@ bool CONFIG_ACTION_ALT(
if (!settings_list_append(list, list_info))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
return true;
}
@ -1885,6 +1923,8 @@ bool CONFIG_ACTION(
if (!settings_list_append(list, list_info))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
#ifdef HAVE_MENU
@ -1904,6 +1944,8 @@ bool START_GROUP(rarch_setting_t **list, rarch_setting_info_t *list_info,
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
return true;
}
@ -1914,6 +1956,8 @@ bool END_GROUP(rarch_setting_t **list, rarch_setting_info_t *list_info,
rarch_setting_t value = setting_group_setting (ST_END_GROUP, 0, parent_group);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
return true;
}
@ -1931,6 +1975,8 @@ bool START_SUB_GROUP(rarch_setting_t **list,
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
return true;
}
@ -1943,6 +1989,8 @@ bool END_SUB_GROUP(
rarch_setting_t value = setting_group_setting (ST_END_SUB_GROUP, 0, parent_group);
if (!(settings_list_append(list, list_info)))
return false;
if (value.name)
value.name_hash = msg_hash_calculate(value.name);
(*list)[list_info->index++] = value;
return true;
}

View File

@ -104,6 +104,7 @@ struct rarch_setting
unsigned bind_type;
uint32_t size;
uint32_t name_hash;
float step;