Get rid of MENU_LABEL_FAVORITES

This commit is contained in:
twinaphex 2018-02-05 20:59:59 +01:00
parent 457d543cb1
commit 81859c805f
3 changed files with 40 additions and 41 deletions

View File

@ -722,6 +722,10 @@ static struct cbs_deferred_lbl_callback cbs_deferred_lbl_list[] = {
{
MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST,
deferred_video_history_list
},
{
MENU_ENUM_LABEL_FAVORITES,
deferred_push_detect_core_list
}
};
@ -1317,7 +1321,6 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_history_path);
break;
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
case MENU_LABEL_FAVORITES:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_detect_core_list);
break;
default:

View File

@ -3772,7 +3772,12 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
return 0;
}
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 (cbs->enum_idx != MSG_UNKNOWN)
{
switch (cbs->enum_idx)
{
@ -4242,9 +4247,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
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;
@ -4284,6 +4286,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
}
static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
const char *menu_label,
uint32_t label_hash, uint32_t menu_label_hash, unsigned type)
{
if (type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD ||
@ -4381,17 +4384,14 @@ 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
{
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;
}
BIND_ACTION_OK(cbs, action_ok_compressed_archive_push);
}
break;
case FILE_TYPE_CORE:
@ -4523,33 +4523,30 @@ 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_FAVORITES)) ||
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_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
{
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;
}
BIND_ACTION_OK(cbs, action_ok_file_load);
}
break;
case FILE_TYPE_MOVIE:
@ -4599,7 +4596,7 @@ int menu_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
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_hash, menu_label_hash, type) == 0)
if (menu_cbs_init_bind_ok_compare_type(cbs, label, label_hash, menu_label_hash, type) == 0)
return 0;
return -1;

View File

@ -1888,7 +1888,6 @@ enum msg_hash_enums
#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