mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Get rid of more hashes
This commit is contained in:
parent
115bdd9fe5
commit
596901b335
@ -3844,7 +3844,7 @@ static struct cbs_push_lbl_callback cbs_ok_lbl_list[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||||
const char *label, uint32_t hash)
|
const char *label)
|
||||||
{
|
{
|
||||||
unsigned k;
|
unsigned k;
|
||||||
|
|
||||||
@ -3890,7 +3890,27 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cbs->enum_idx != MSG_UNKNOWN)
|
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)
|
||||||
{
|
{
|
||||||
switch (cbs->enum_idx)
|
switch (cbs->enum_idx)
|
||||||
{
|
{
|
||||||
@ -4310,29 +4330,11 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
return 0;
|
||||||
{
|
|
||||||
switch (hash)
|
|
||||||
{
|
|
||||||
case MENU_LABEL_FAVORITES:
|
|
||||||
BIND_ACTION_OK(cbs, action_ok_push_content_list);
|
|
||||||
break;
|
|
||||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
|
||||||
BIND_ACTION_OK(cbs, action_ok_remap_file);
|
|
||||||
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;
|
|
||||||
default:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||||
@ -4645,15 +4647,14 @@ 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,
|
int menu_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||||
const char *path, const char *menu_label,
|
const char *path, const char *menu_label,
|
||||||
const char *label, unsigned type, size_t idx,
|
const char *label, unsigned type, size_t idx)
|
||||||
uint32_t label_hash)
|
|
||||||
{
|
{
|
||||||
if (!cbs)
|
if (!cbs)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
BIND_ACTION_OK(cbs, action_ok_lookup_setting);
|
BIND_ACTION_OK(cbs, action_ok_lookup_setting);
|
||||||
|
|
||||||
if (menu_cbs_init_bind_ok_compare_label(cbs, label, label_hash) == 0)
|
if (menu_cbs_init_bind_ok_compare_label(cbs, label) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (menu_cbs_init_bind_ok_compare_type(cbs, menu_label, type) == 0)
|
if (menu_cbs_init_bind_ok_compare_type(cbs, menu_label, type) == 0)
|
||||||
|
@ -236,7 +236,7 @@ void menu_cbs_init(void *data,
|
|||||||
/* It will try to find a corresponding callback function inside
|
/* It will try to find a corresponding callback function inside
|
||||||
* menu_cbs_ok.c, then map this callback to the entry. */
|
* menu_cbs_ok.c, then map this callback to the entry. */
|
||||||
menu_cbs_init_bind_ok(cbs, path, menu_label,
|
menu_cbs_init_bind_ok(cbs, path, menu_label,
|
||||||
label, type, idx, label_hash);
|
label, type, idx);
|
||||||
|
|
||||||
menu_cbs_init_log(repr_label, "OK", cbs->action_ok_ident);
|
menu_cbs_init_log(repr_label, "OK", cbs->action_ok_ident);
|
||||||
|
|
||||||
|
@ -214,8 +214,7 @@ int menu_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs,
|
|||||||
|
|
||||||
int menu_cbs_init_bind_ok(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 *path, const char *menu_label,
|
||||||
const char *label, unsigned type, size_t idx,
|
const char *label, unsigned type, size_t idx);
|
||||||
uint32_t label_hash);
|
|
||||||
|
|
||||||
int menu_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user