mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
Merge pull request #9807 from libretro/deferred-refactors-pt2
(menu_cbs_ok) Cleanups
This commit is contained in:
commit
bfe00ac6f3
@ -6154,30 +6154,33 @@ static int is_rdb_entry(enum msg_hash_enums enum_idx)
|
|||||||
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, uint32_t hash)
|
||||||
{
|
{
|
||||||
if (cbs->enum_idx != MSG_UNKNOWN && is_rdb_entry(cbs->enum_idx) == 0)
|
|
||||||
{
|
|
||||||
BIND_ACTION_OK(cbs, action_ok_rdb_entry_submenu);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cbs->enum_idx != MSG_UNKNOWN)
|
if (cbs->enum_idx != MSG_UNKNOWN)
|
||||||
{
|
{
|
||||||
const char *str = msg_hash_to_str(cbs->enum_idx);
|
const char *str = msg_hash_to_str(cbs->enum_idx);
|
||||||
|
|
||||||
if (str && strstr(str, "input_binds_list"))
|
if (str)
|
||||||
{
|
{
|
||||||
unsigned i;
|
if (is_rdb_entry(cbs->enum_idx) == 0)
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
|
||||||
{
|
{
|
||||||
unsigned first_char = atoi(&str[0]);
|
BIND_ACTION_OK(cbs, action_ok_rdb_entry_submenu);
|
||||||
|
|
||||||
if (first_char != ((i+1)))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
BIND_ACTION_OK(cbs, action_ok_push_user_binds_list);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strstr(str, "input_binds_list"))
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
|
{
|
||||||
|
unsigned first_char = atoi(&str[0]);
|
||||||
|
|
||||||
|
if (first_char != ((i+1)))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
BIND_ACTION_OK(cbs, action_ok_push_user_binds_list);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user