* menu_entries_append and menu_entries_append_enum are now combined into

one - if you set the last parameter to a valid 'rarch_setting_t' pointer
and enum_msg to MSG_UNKNOWN, you will get the previous menu_entries_append
behavior
* Renamed remaining function to menu_entries_append so that we have one
consistent way of adding menu entries instead of two
Reduces some code duplication significantly
This commit is contained in:
LibretroAdmin 2022-08-27 17:40:52 +02:00
parent e6fd2c9cdb
commit f1ff92c881
23 changed files with 1097 additions and 1177 deletions

View File

@ -399,29 +399,29 @@ void rcheevos_menu_populate_hardcore_pause_submenu(void* data)
{
if (rcheevos_locals->hardcore_active)
{
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE_CANCEL),
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_CANCEL),
MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_CANCEL,
MENU_SETTING_ACTION_CLOSE, 0, 0);
menu_entries_append_enum(info->list,
MENU_SETTING_ACTION_CLOSE, 0, 0, NULL);
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE),
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE),
MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE,
MENU_SETTING_ACTION_PAUSE_ACHIEVEMENTS, 0, 0);
MENU_SETTING_ACTION_PAUSE_ACHIEVEMENTS, 0, 0, NULL);
}
else
{
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME_CANCEL),
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_RESUME_CANCEL),
MENU_ENUM_LABEL_ACHIEVEMENT_RESUME_CANCEL,
MENU_SETTING_ACTION_CLOSE, 0, 0);
menu_entries_append_enum(info->list,
MENU_SETTING_ACTION_CLOSE, 0, 0, NULL);
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME),
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_RESUME),
MENU_ENUM_LABEL_ACHIEVEMENT_RESUME,
MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS, 0, 0);
MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS, 0, 0, NULL);
}
}
}
@ -449,17 +449,17 @@ void rcheevos_menu_populate(void* data)
if (settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable)
{
if (rcheevos_locals->hardcore_active)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE),
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_MENU),
MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_MENU,
MENU_SETTING_ACTION_PAUSE_ACHIEVEMENTS, 0, 0);
MENU_SETTING_ACTION_PAUSE_ACHIEVEMENTS, 0, 0, NULL);
else
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME),
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_MENU),
MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_MENU,
MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS, 0, 0);
MENU_SETTING_ACTION_RESUME_ACHIEVEMENTS, 0, 0, NULL);
}
/* update the bucket for each achievement */
@ -596,18 +596,18 @@ void rcheevos_menu_populate(void* data)
do
{
if (menuitem->cheevo)
menu_entries_append_enum(info->list, menuitem->cheevo->title,
menu_entries_append(info->list, menuitem->cheevo->title,
menuitem->cheevo->description,
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
MENU_SETTINGS_CHEEVOS_START + idx, 0, 0);
MENU_SETTINGS_CHEEVOS_START + idx, 0, 0, NULL);
else
{
snprintf(buffer, sizeof(buffer), "----- %s -----",
msg_hash_to_str(menuitem->state_label_idx));
menu_entries_append_enum(info->list, buffer, "",
menu_entries_append(info->list, buffer, "",
MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
MENU_SETTINGS_CHEEVOS_START + idx, 0, 0);
MENU_SETTINGS_CHEEVOS_START + idx, 0, 0, NULL);
}
++idx;
@ -618,35 +618,35 @@ void rcheevos_menu_populate(void* data)
{
/* no achievements found */
if (!rcheevos_locals->core_supports)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE),
msg_hash_to_str(MENU_ENUM_LABEL_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE),
MENU_ENUM_LABEL_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE,
FILE_TYPE_NONE, 0, 0);
FILE_TYPE_NONE, 0, 0, NULL);
else if (rcheevos_locals->load_info.state == RCHEEVOS_LOAD_STATE_NETWORK_ERROR)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETWORK_ERROR),
msg_hash_to_str(MENU_ENUM_LABEL_NETWORK_ERROR),
MENU_ENUM_LABEL_NETWORK_ERROR,
FILE_TYPE_NONE, 0, 0);
FILE_TYPE_NONE, 0, 0, NULL);
else if (!rcheevos_locals->game.id)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN_GAME),
msg_hash_to_str(MENU_ENUM_LABEL_UNKNOWN_GAME),
MENU_ENUM_LABEL_UNKNOWN_GAME,
FILE_TYPE_NONE, 0, 0);
FILE_TYPE_NONE, 0, 0, NULL);
else if (!rcheevos_locals->token[0])
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_LOGGED_IN),
msg_hash_to_str(MENU_ENUM_LABEL_NOT_LOGGED_IN),
MENU_ENUM_LABEL_NOT_LOGGED_IN,
FILE_TYPE_NONE, 0, 0);
FILE_TYPE_NONE, 0, 0, NULL);
else
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY),
msg_hash_to_str(MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY),
MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY,
FILE_TYPE_NONE, 0, 0);
FILE_TYPE_NONE, 0, 0, NULL);
}
}

View File

@ -555,12 +555,12 @@ static int frontend_ctr_parse_drive_list(void* data, bool load_content)
if (!list)
return -1;
menu_entries_append_enum(list,
menu_entries_append(list,
"sdmc:/",
msg_hash_to_str(
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;

View File

@ -778,15 +778,15 @@ static int frontend_darwin_parse_drive_list(void *data, bool load_content)
CFSearchPathForDirectoriesInDomains(
home_dir_buf, sizeof(home_dir_buf));
menu_entries_append_enum(list,
menu_entries_append(list,
home_dir_buf,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list, "/",
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
ret = 0;

View File

@ -521,27 +521,27 @@ static int frontend_gx_parse_drive_list(void *data, bool load_content)
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
#ifdef HW_RVL
menu_entries_append_enum(list,
menu_entries_append(list,
"sd:/",
msg_hash_to_str(MSG_EXTERNAL_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"usb:/",
msg_hash_to_str(MSG_EXTERNAL_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
menu_entries_append_enum(list,
menu_entries_append(list,
"carda:/",
msg_hash_to_str(MSG_EXTERNAL_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"cardb:/",
msg_hash_to_str(MSG_EXTERNAL_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;

View File

@ -294,23 +294,23 @@ static int frontend_orbis_parse_drive_list(void *data, bool load_content)
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
menu_entries_append_enum(list,
menu_entries_append(list,
"/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append_enum(list,
menu_entries_append(list,
"/data",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append_enum(list,
menu_entries_append(list,
"/usb0",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;
}

View File

@ -483,48 +483,48 @@ static int frontend_ps2_parse_drive_list(void *data, bool load_content)
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
menu_entries_append_enum(list,
menu_entries_append(list,
rootDevicePath(BOOT_DEVICE_MC0),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
rootDevicePath(BOOT_DEVICE_MC1),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
rootDevicePath(BOOT_DEVICE_CDFS),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
rootDevicePath(BOOT_DEVICE_MASS),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
if (hdd_mounted)
{
size_t _len = strlcpy(hdd, mountString, sizeof(hdd));
hdd[_len ] = '/';
hdd[_len+1] = '\0';
menu_entries_append_enum(list,
menu_entries_append(list,
hdd,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
menu_entries_append_enum(list,
menu_entries_append(list,
rootDevicePath(BOOT_DEVICE_HOST),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#if defined(DEBUG) && !defined(BUILD_FOR_PCSX2)
menu_entries_append_enum(list,
menu_entries_append(list,
"host:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
#endif

View File

@ -548,66 +548,66 @@ static int frontend_ps3_parse_drive_list(void *data, bool load_content)
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
menu_entries_append_enum(list,
menu_entries_append(list,
"/app_home/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_hdd0/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_hdd1/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_bdvd/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/host_root/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb000/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb001/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb002/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb003/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb004/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb005/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"/dev_usb006/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;

View File

@ -494,47 +494,47 @@ static int frontend_psp_parse_drive_list(void *data, bool load_content)
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
#ifdef VITA
menu_entries_append_enum(list,
menu_entries_append(list,
"app0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"ur0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"ux0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"uma0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"imc0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#else
menu_entries_append_enum(list,
menu_entries_append(list,
"ms0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"ef0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"host0:/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
#endif

View File

@ -622,10 +622,10 @@ static int frontend_switch_parse_drive_list(void *data, bool load_content)
if (!list)
return -1;
menu_entries_append_enum(list,
menu_entries_append(list,
"/", msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;

View File

@ -2154,43 +2154,43 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
internal_storage_path, "RetroArch",
sizeof(user_data_path));
menu_entries_append_enum(list,
menu_entries_append(list,
user_data_path,
msg_hash_to_str(MSG_INTERNAL_STORAGE),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
menu_entries_append_enum(list,
menu_entries_append(list,
internal_storage_path,
msg_hash_to_str(MSG_INTERNAL_STORAGE),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
else
menu_entries_append_enum(list,
menu_entries_append(list,
"/storage/emulated/0",
msg_hash_to_str(MSG_REMOVABLE_STORAGE),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append_enum(list,
menu_entries_append(list,
"/storage",
msg_hash_to_str(MSG_REMOVABLE_STORAGE),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
if (!string_is_empty(internal_storage_app_path))
menu_entries_append_enum(list,
menu_entries_append(list,
internal_storage_app_path,
msg_hash_to_str(MSG_EXTERNAL_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
if (!string_is_empty(app_dir))
menu_entries_append_enum(list,
menu_entries_append(list,
app_dir,
msg_hash_to_str(MSG_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
for (unsigned i=0; i < volume_count; i++)
{
static char aux_path[PATH_MAX_LENGTH];
@ -2214,26 +2214,26 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
(*env)->ReleaseStringUTFChars(env, jstr, str);
if (!string_is_empty(aux_path))
menu_entries_append_enum(list,
menu_entries_append(list,
aux_path,
msg_hash_to_str(MSG_APPLICATION_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
}
#elif defined(WEBOS)
if (path_is_directory("/media/internal"))
menu_entries_append_enum(list, "/media/internal",
menu_entries_append(list, "/media/internal",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
if (path_is_directory("/tmp/usb"))
menu_entries_append_enum(list, "/tmp/usb",
menu_entries_append(list, "/tmp/usb",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#else
char base_path[PATH_MAX] = {0};
char udisks_media_path[PATH_MAX] = {0};
@ -2266,45 +2266,45 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
if (!string_is_empty(base_path))
{
menu_entries_append_enum(list, base_path,
menu_entries_append(list, base_path,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
if (!string_is_empty(home))
{
menu_entries_append_enum(list, home,
menu_entries_append(list, home,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
if (path_is_directory(udisks_media_path))
{
menu_entries_append_enum(list, udisks_media_path,
menu_entries_append(list, udisks_media_path,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
if (path_is_directory("/media"))
{
menu_entries_append_enum(list, "/media",
menu_entries_append(list, "/media",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
if (path_is_directory("/mnt"))
{
menu_entries_append_enum(list, "/mnt",
menu_entries_append(list, "/mnt",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
#endif
menu_entries_append_enum(list, "/",
menu_entries_append(list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;

View File

@ -247,36 +247,36 @@ static int frontend_uwp_parse_drive_list(void *data, bool load_content)
if (drives & (1 << i))
{
TCHAR driveName[] = { TEXT('A') + i, TEXT(':'), TEXT('\\'), TEXT('\0') };
menu_entries_append_enum(list,
menu_entries_append(list,
driveName,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
have_any_drives = true;
}
}
menu_entries_append_enum(list,
menu_entries_append(list,
home_dir,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
if (!have_any_drives)
{
menu_entries_append_enum(list,
menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FILE_BROWSER_OPEN_PICKER),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_BROWSER_OPEN_PICKER),
MENU_ENUM_LABEL_FILE_BROWSER_OPEN_PICKER,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
if (string_is_equal(uwp_device_family, "Windows.Desktop"))
{
menu_entries_append_enum(list,
menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FILE_BROWSER_OPEN_UWP_PERMISSIONS),
msg_hash_to_str(MENU_ENUM_LABEL_FILE_BROWSER_OPEN_UWP_PERMISSIONS),
MENU_ENUM_LABEL_FILE_BROWSER_OPEN_UWP_PERMISSIONS,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
}
}
#endif

View File

@ -178,19 +178,19 @@ static int frontend_wiiu_parse_drive_list(void *data, bool load_content)
if (!list)
return -1;
menu_entries_append_enum(list, WIIU_SD_PATH,
menu_entries_append(list, WIIU_SD_PATH,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append_enum(list, WIIU_USB_PATH,
menu_entries_append(list, WIIU_USB_PATH,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list, WIIU_STORAGE_USB_PATH,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list, WIIU_STORAGE_USB_PATH,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
return 0;
}

View File

@ -555,11 +555,11 @@ static int frontend_win32_parse_drive_list(void *data, bool load_content)
{
drive[0] = 'A' + i;
if (drives & (1 << i))
menu_entries_append_enum(list,
menu_entries_append(list,
drive,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
}
#endif

View File

@ -371,37 +371,37 @@ static int frontend_xdk_parse_drive_list(void *data, bool load_content)
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
#if defined(_XBOX1)
menu_entries_append_enum(list,
menu_entries_append(list,
"C:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"D:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"E:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"F:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list,
FILE_TYPE_DIRECTORY, 0, 0, NULL);
menu_entries_append(list,
"G:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#elif defined(_XBOX360)
menu_entries_append_enum(list,
menu_entries_append(list,
"game:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
FILE_TYPE_DIRECTORY, 0, 0, NULL);
#endif
#endif

View File

@ -1651,9 +1651,9 @@ int generic_action_ok_displaylist_push(const char *path,
info_path = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS);
info_label = msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS);
info.enum_idx = MENU_ENUM_LABEL_CONTENT_SETTINGS;
menu_entries_append_enum(menu_stack, info_path, info_label,
menu_entries_append(menu_stack, info_path, info_label,
MENU_ENUM_LABEL_CONTENT_SETTINGS,
0, 0, 0);
0, 0, 0, NULL);
dl_type = DISPLAYLIST_CONTENT_SETTINGS;
break;
}

View File

@ -9304,33 +9304,33 @@ static int materialui_list_push(void *data, void *userdata,
{
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0);
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL);
core_info_get_list(&list);
if (list->info_count > 0)
{
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
}
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append_enum(info->list, "/",
menu_entries_append(info->list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
info->need_push = true;
info->need_refresh = true;

View File

@ -8545,42 +8545,42 @@ static int ozone_list_push(void *data, void *userdata,
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0);
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL);
core_info_get_list(&list);
if (list && list->info_count > 0)
{
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
}
if (menu_content_show_playlists)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append_enum(info->list, "/",
menu_entries_append(info->list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
if (!kiosk_mode_enable)
{
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
}
info->need_push = true;
@ -10880,10 +10880,10 @@ static bool ozone_menu_init_list(void *data)
info.type_default = FILE_TYPE_PLAIN;
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;
menu_entries_append_enum(menu_stack, info.path,
menu_entries_append(menu_stack, info.path,
info.label,
MENU_ENUM_LABEL_MAIN_MENU,
info.type, info.flags, 0);
info.type, info.flags, 0, NULL);
info.list = selection_buf;

View File

@ -7370,39 +7370,39 @@ static int xmb_list_push(void *data, void *userdata,
case DISPLAYLIST_LOAD_CONTENT_LIST:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0);
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL);
core_info_get_list(&list);
if (list->info_count > 0)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
if (menu_content_show_pl)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append_enum(info->list, "/",
menu_entries_append(info->list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
if (!kiosk_mode_enable)
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0);
MENU_SETTING_ACTION, 0, 0, NULL);
info->need_push = true;
info->need_refresh = true;
@ -7648,10 +7648,10 @@ static bool xmb_menu_init_list(void *data)
info.type_default = FILE_TYPE_PLAIN;
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;
menu_entries_append_enum(menu_stack, info.path,
menu_entries_append(menu_stack, info.path,
info.label,
MENU_ENUM_LABEL_MAIN_MENU,
info.type, info.flags, 0);
info.type, info.flags, 0, NULL);
info.list = selection_buf;

View File

@ -452,12 +452,12 @@ unsigned menu_displaylist_contentless_cores(file_list_t *list, settings_t *setti
}
if (core_valid &&
menu_entries_append_enum(list,
menu_entries_append(list,
core_info->path,
core_info->core_file_id.str,
MENU_ENUM_LABEL_CONTENTLESS_CORE,
MENU_SETTING_ACTION_CONTENTLESS_CORE_RUN,
0, 0))
0, 0, NULL))
{
file_list_set_alt_at_offset(
list, menu_index, core_info->display_name);
@ -485,11 +485,11 @@ unsigned menu_displaylist_contentless_cores(file_list_t *list, settings_t *setti
}
if ((count == 0) &&
menu_entries_append_enum(list,
menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORES_AVAILABLE),
msg_hash_to_str(MENU_ENUM_LABEL_NO_CORES_AVAILABLE),
MENU_ENUM_LABEL_NO_CORES_AVAILABLE,
0, 0, 0))
0, 0, 0, NULL))
count++;
return count;

File diff suppressed because it is too large Load Diff

View File

@ -2298,11 +2298,11 @@ static bool menu_driver_displaylist_push_internal(
#if 0
#ifdef HAVE_SCREENSHOTS
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
menu_entries_append_enum(info->list,
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT),
msg_hash_to_str(MENU_ENUM_LABEL_TAKE_SCREENSHOT),
MENU_ENUM_LABEL_TAKE_SCREENSHOT,
MENU_SETTING_ACTION_SCREENSHOT, 0, 0);
MENU_SETTING_ACTION_SCREENSHOT, 0, 0, NULL);
else
info->need_push_no_playlist_entries = true;
#endif
@ -3392,11 +3392,11 @@ bool generic_menu_init_list(struct menu_state *menu_st,
msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU));
info.enum_idx = MENU_ENUM_LABEL_MAIN_MENU;
menu_entries_append_enum(menu_stack,
menu_entries_append(menu_stack,
info.path,
info.label,
MENU_ENUM_LABEL_MAIN_MENU,
info.type, info.flags, 0);
info.type, info.flags, 0, NULL);
info.list = selection_buf;
@ -4336,99 +4336,15 @@ int menu_entry_action(
return -1;
}
void menu_entries_append(
file_list_t *list,
const char *path,
const char *label,
unsigned type,
size_t directory_ptr,
size_t entry_idx)
{
menu_ctx_list_t list_info;
size_t i;
size_t idx;
const char *menu_path = NULL;
menu_file_list_cbs_t *cbs = NULL;
struct menu_state *menu_st = &menu_driver_state;
if (!list || !label)
return;
file_list_append(list, path, label, type, directory_ptr, entry_idx);
file_list_get_last(MENU_LIST_GET(menu_st->entries.list, 0),
&menu_path, NULL, NULL, NULL);
idx = list->size - 1;
list_info.list = list;
list_info.path = path;
list_info.fullpath = NULL;
if (!string_is_empty(menu_path))
list_info.fullpath = strdup(menu_path);
list_info.label = label;
list_info.idx = idx;
list_info.entry_type = type;
if ( menu_st->driver_ctx &&
menu_st->driver_ctx->list_insert)
menu_st->driver_ctx->list_insert(
menu_st->userdata,
list_info.list,
list_info.path,
list_info.fullpath,
list_info.label,
list_info.idx,
list_info.entry_type);
if (list_info.fullpath)
free(list_info.fullpath);
file_list_free_actiondata(list, idx);
if (!(cbs = (menu_file_list_cbs_t*)
malloc(sizeof(menu_file_list_cbs_t))))
return;
cbs->action_sublabel_cache[0] = '\0';
cbs->action_title_cache[0] = '\0';
cbs->enum_idx = MSG_UNKNOWN;
cbs->checked = false;
cbs->setting = menu_setting_find(label);
cbs->action_iterate = NULL;
cbs->action_deferred_push = NULL;
cbs->action_select = NULL;
cbs->action_get_title = NULL;
cbs->action_ok = NULL;
cbs->action_cancel = NULL;
cbs->action_scan = NULL;
cbs->action_start = NULL;
cbs->action_info = NULL;
cbs->action_left = NULL;
cbs->action_right = NULL;
cbs->action_label = NULL;
cbs->action_sublabel = NULL;
cbs->action_get_value = NULL;
cbs->search.size = 0;
for (i = 0; i < MENU_SEARCH_FILTER_MAX_TERMS; i++)
cbs->search.terms[i][0] = '\0';
list->list[idx].actiondata = cbs;
menu_cbs_init(menu_st,
menu_st->driver_ctx,
list, cbs, path, label, type, idx);
}
bool menu_entries_append_enum(
bool menu_entries_append(
file_list_t *list,
const char *path,
const char *label,
enum msg_hash_enums enum_idx,
unsigned type,
size_t directory_ptr,
size_t entry_idx)
size_t entry_idx,
rarch_setting_t *setting)
{
menu_ctx_list_t list_info;
size_t i;
@ -4471,17 +4387,16 @@ bool menu_entries_append_enum(
free(list_info.fullpath);
file_list_free_actiondata(list, idx);
cbs = (menu_file_list_cbs_t*)
malloc(sizeof(menu_file_list_cbs_t));
if (!cbs)
if (!(cbs = (menu_file_list_cbs_t*)
malloc(sizeof(menu_file_list_cbs_t))))
return false;
cbs->action_sublabel_cache[0] = '\0';
cbs->action_title_cache[0] = '\0';
cbs->enum_idx = enum_idx;
cbs->checked = false;
cbs->setting = NULL;
cbs->setting = setting;
cbs->action_iterate = NULL;
cbs->action_deferred_push = NULL;
cbs->action_select = NULL;
@ -4503,12 +4418,15 @@ bool menu_entries_append_enum(
list->list[idx].actiondata = cbs;
if ( enum_idx != MENU_ENUM_LABEL_PLAYLIST_ENTRY
&& enum_idx != MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY
&& enum_idx != MENU_ENUM_LABEL_EXPLORE_ITEM
&& enum_idx != MENU_ENUM_LABEL_CONTENTLESS_CORE
&& enum_idx != MENU_ENUM_LABEL_RDB_ENTRY)
cbs->setting = menu_setting_find_enum(enum_idx);
if (!cbs->setting && enum_idx != MSG_UNKNOWN)
{
if ( enum_idx != MENU_ENUM_LABEL_PLAYLIST_ENTRY
&& enum_idx != MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY
&& enum_idx != MENU_ENUM_LABEL_EXPLORE_ITEM
&& enum_idx != MENU_ENUM_LABEL_CONTENTLESS_CORE
&& enum_idx != MENU_ENUM_LABEL_RDB_ENTRY)
cbs->setting = menu_setting_find_enum(enum_idx);
}
menu_cbs_init(menu_st,
menu_st->driver_ctx,

View File

@ -166,9 +166,6 @@ file_list_t *menu_entries_get_selection_buf_ptr(size_t idx);
file_list_t *menu_entries_get_menu_stack_ptr(size_t idx);
void menu_entries_append(file_list_t *list, const char *path, const char *label,
unsigned type, size_t directory_ptr, size_t entry_idx);
void menu_entries_get_last_stack(const char **path, const char **label,
unsigned *file_type, enum msg_hash_enums *enum_idx, size_t *entry_idx);
@ -187,10 +184,11 @@ void menu_entries_prepend(file_list_t *list,
enum msg_hash_enums enum_idx,
unsigned type, size_t directory_ptr, size_t entry_idx);
bool menu_entries_append_enum(file_list_t *list,
bool menu_entries_append(file_list_t *list,
const char *path, const char *label,
enum msg_hash_enums enum_idx,
unsigned type, size_t directory_ptr, size_t entry_idx);
unsigned type, size_t directory_ptr, size_t entry_idx,
rarch_setting_t *setting);
bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data);

View File

@ -843,9 +843,9 @@ static menu_file_list_cbs_t *explore_menu_entry(
menu_file_list_cbs_t *cbs = NULL;
if (!state)
return NULL;
menu_entries_append_enum(list, path,
menu_entries_append(list, path,
state->label_explore_item_str,
MENU_ENUM_LABEL_EXPLORE_ITEM, type, 0, 0);
MENU_ENUM_LABEL_EXPLORE_ITEM, type, 0, 0, NULL);
cbs = ((menu_file_list_cbs_t*)list->list[list->size-1].actiondata);
if (!cbs)
return NULL;
@ -898,11 +898,11 @@ unsigned menu_displaylist_explore(file_list_t *list,
settings->paths.directory_playlist,
settings->paths.path_content_database);
menu_entries_append_enum(list,
menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_INITIALISING_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_INITIALISING_LIST),
MENU_ENUM_LABEL_EXPLORE_INITIALISING_LIST,
FILE_TYPE_NONE, 0, 0);
FILE_TYPE_NONE, 0, 0, NULL);
if (menu_stack->size > 1)
{