Get rid of more hashes

This commit is contained in:
twinaphex 2018-02-06 21:55:49 +01:00
parent 934d5782a7
commit 5202afb173
4 changed files with 51 additions and 55 deletions

View File

@ -826,11 +826,26 @@ static struct cbs_deferred_lbl_callback cbs_deferred_lbl_list[] = {
{
MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST,
deferred_push_accounts_cheevos_list
},
#ifdef HAVE_LIBRETRODB
{
MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST,
deferred_push_cursor_manager_list_deferred
},
#endif
{
MENU_ENUM_LABEL_DEFERRED_CORE_LIST,
deferred_push_core_list_deferred
}
};
static struct cbs_deferred_lbl_callback cbs_deferred2_lbl_list[] = {
#ifdef HAVE_NETWORKING
{
MENU_ENUM_LABEL_DEFERRED_LAKKA_LIST,
deferred_push_lakka_list
},
{
MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST,
deferred_push_core_updater_list
@ -939,6 +954,10 @@ static struct cbs_deferred_lbl_callback cbs_deferred2_lbl_list[] = {
{
MENU_ENUM_LABEL_ADD_CONTENT_LIST,
deferred_push_add_content_list
},
{
MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST,
deferred_push_database_manager_list_deferred
}
};
@ -1264,11 +1283,6 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_LABEL_DEFERRED_ARCHIVE_OPEN:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_open);
break;
case MENU_LABEL_DEFERRED_LAKKA_LIST:
#ifdef HAVE_NETWORKING
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_lakka_list);
#endif
break;
case MENU_LABEL_DATABASE_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_database_manager_list);
break;
@ -1278,22 +1292,13 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_LABEL_REMAP_FILE_LOAD:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_remap_file_load);
break;
case MENU_LABEL_DEFERRED_CORE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_list_deferred);
break;
case MENU_LABEL_DEFERRED_CORE_LIST_SET:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_collection_list_deferred);
break;
case MENU_LABEL_DEFERRED_VIDEO_FILTER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_filter);
break;
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_database_manager_list_deferred);
break;
#ifdef HAVE_LIBRETRODB
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred);
break;
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_publisher);
break;

View File

@ -4463,19 +4463,14 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
else if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)))
{
BIND_ACTION_OK(cbs, action_ok_load_core);
break;
}
else
else if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_LIST)))
{
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;
}
BIND_ACTION_OK(cbs, action_ok_load_core_deferred);
}
else if (menu_label_hash == MENU_LABEL_DEFERRED_CORE_LIST_SET)
{
BIND_ACTION_OK(cbs, action_ok_core_deferred_set);
}
break;
case FILE_TYPE_DOWNLOAD_CORE_CONTENT:
@ -4504,17 +4499,14 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
{
BIND_ACTION_OK(cbs, action_ok_database_manager_list);
}
else
else if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST)))
{
switch (menu_label_hash)
{
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
break;
case MENU_LABEL_DATABASE_MANAGER_LIST:
BIND_ACTION_OK(cbs, action_ok_database_manager_list);
break;
}
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
}
else if (menu_label_hash == MENU_LABEL_DATABASE_MANAGER_LIST)
{
BIND_ACTION_OK(cbs, action_ok_database_manager_list);
}
break;
case FILE_TYPE_RDB_ENTRY:
@ -4527,14 +4519,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:
switch (menu_label_hash)
if (string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DATABASE_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;
BIND_ACTION_OK(cbs, action_ok_deferred_list_stub);
}
else if (menu_label_hash == MENU_LABEL_CURSOR_MANAGER_LIST)
{
BIND_ACTION_OK(cbs, action_ok_cursor_manager_list);
}
break;
case FILE_TYPE_VIDEOFILTER:

View File

@ -721,6 +721,18 @@ static struct cbs_title_lbl_callback cbs_title_lbl_list[] = {
{
MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_LIST,
action_get_user_accounts_list
},
{
MENU_ENUM_LABEL_DEFERRED_CORE_LIST,
action_get_title_deferred_core_list
},
{
MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST,
action_get_title_deferred_cursor_manager_list
},
{
MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST,
action_get_title_deferred_database_manager_list
}
};
@ -1055,12 +1067,6 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
{
switch (label_hash)
{
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_title_deferred_database_manager_list);
break;
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_title_deferred_cursor_manager_list);
break;
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
BIND_ACTION_GET_TITLE(cbs, action_get_title_list_rdb_entry_developer);
break;
@ -1106,9 +1112,6 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL:
BIND_ACTION_GET_TITLE(cbs, action_get_title_list_rdb_entry_database_info);
break;
case MENU_LABEL_DEFERRED_CORE_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_title_deferred_core_list);
break;
case MENU_LABEL_DATABASE_MANAGER_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_database_manager_list);
break;

View File

@ -1741,8 +1741,6 @@ enum msg_hash_enums
#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
@ -1761,12 +1759,10 @@ enum msg_hash_enums
#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_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_LAKKA_LIST 0x3db437c4U
#define MENU_LABEL_RDB_ENTRY_START_CONTENT 0x95025a55U