Merge pull request #9807 from libretro/deferred-refactors-pt2

(menu_cbs_ok) Cleanups
This commit is contained in:
Twinaphex 2019-12-02 06:17:30 +01:00 committed by GitHub
commit bfe00ac6f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6154,17 +6154,19 @@ 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) if (cbs->enum_idx != MSG_UNKNOWN)
{
const char *str = msg_hash_to_str(cbs->enum_idx);
if (str)
{
if (is_rdb_entry(cbs->enum_idx) == 0)
{ {
BIND_ACTION_OK(cbs, action_ok_rdb_entry_submenu); BIND_ACTION_OK(cbs, action_ok_rdb_entry_submenu);
return 0; return 0;
} }
if (cbs->enum_idx != MSG_UNKNOWN) if (strstr(str, "input_binds_list"))
{
const char *str = msg_hash_to_str(cbs->enum_idx);
if (str && strstr(str, "input_binds_list"))
{ {
unsigned i; unsigned i;
@ -6180,6 +6182,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
} }
} }
} }
}
if (menu_setting_get_browser_selection_type(cbs->setting) == ST_DIR) if (menu_setting_get_browser_selection_type(cbs->setting) == ST_DIR)
{ {