mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-29 15:32:01 +00:00
If playlist directory is not set, make it possible in XMB mode to
still escape to the left and/or right when there are no playlist entries found.
This commit is contained in:
parent
91a7be042f
commit
d42f01ad35
@ -135,6 +135,7 @@ static int action_left_scroll(unsigned type, const char *label,
|
||||
static int action_left_mainmenu(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
RARCH_LOG("Gets here.\n");
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
unsigned push_list = 0;
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
@ -341,7 +342,7 @@ static int bind_left_generic(unsigned type, const char *label,
|
||||
}
|
||||
|
||||
static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
const char *label, uint32_t label_hash, const char *elem0)
|
||||
const char *label, uint32_t label_hash, uint32_t menu_label_hash, const char *elem0)
|
||||
{
|
||||
unsigned i;
|
||||
rarch_setting_t *setting = menu_setting_find(label);
|
||||
@ -402,6 +403,14 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_SCREEN_RESOLUTION:
|
||||
cbs->action_left = action_left_video_resolution;
|
||||
break;
|
||||
case MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE:
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
cbs->action_left = action_left_mainmenu;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@ -492,7 +501,7 @@ int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
|
||||
cbs->action_left = bind_left_generic;
|
||||
|
||||
if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, elem0) == 0)
|
||||
if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0)
|
||||
return 0;
|
||||
|
||||
if (menu_cbs_init_bind_left_compare_type(cbs, type, label_hash, menu_label_hash) == 0)
|
||||
|
@ -474,6 +474,14 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_SCREEN_RESOLUTION:
|
||||
cbs->action_right = action_right_video_resolution;
|
||||
break;
|
||||
case MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE:
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE:
|
||||
return "no_playlist_entries_available";
|
||||
case MENU_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
|
||||
return "downloaded_file_detect_core_list";
|
||||
case MENU_LABEL_UPDATE_CORE_INFO_FILES:
|
||||
|
@ -739,8 +739,9 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
if (list_size <= 0)
|
||||
{
|
||||
menu_list_push(info->list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE), "",
|
||||
MENU_SETTINGS_CORE_OPTION_NONE, 0, 0);
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1289,7 +1290,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
|
||||
if (db_info->count < 1)
|
||||
menu_list_push(info->list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
"",
|
||||
menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
0, 0, 0);
|
||||
|
||||
content_playlist_free(playlist);
|
||||
|
@ -168,7 +168,6 @@ extern "C" {
|
||||
#define MENU_LABEL_VALUE_NO_SHADER_PARAMETERS 0x8ccc809bU
|
||||
#define MENU_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE 0x2a11fe80U
|
||||
#define MENU_LABEL_VALUE_NO_CORES_AVAILABLE 0xe16bfd0dU
|
||||
#define MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE 0xea82695dU
|
||||
#define MENU_LABEL_SAVE_STATE 0x3a4849b5U
|
||||
#define MENU_LABEL_VALUE_LOAD_STATE 0xd23ba706U
|
||||
#define MENU_LABEL_VALUE_SAVE_STATE 0x3e182415U
|
||||
@ -441,6 +440,7 @@ extern "C" {
|
||||
|
||||
#define MENU_LABEL_TURBO 0x107434f1U
|
||||
|
||||
#define MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE 0x8888c5acU
|
||||
#define MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE 0xea82695dU
|
||||
#define MENU_LABEL_VALUE_RDB_ENTRY_START_CONTENT 0x2cf73cceU
|
||||
#define MENU_LABEL_RDB_ENTRY_ANALOG 0x9081c2ffU
|
||||
|
Loading…
x
Reference in New Issue
Block a user