mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
Revert "(XMB) Restore the contextual menu"
This commit is contained in:
parent
89902543c3
commit
54f29e49d8
@ -61,11 +61,6 @@ static int deferred_push_rdb_entry_detail(menu_displaylist_info_t *info)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int deferred_push_rpl_entry_actions(menu_displaylist_info_t *info)
|
||||
{
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS);
|
||||
}
|
||||
|
||||
static int deferred_push_core_list_deferred(menu_displaylist_info_t *info)
|
||||
{
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_CORES_SUPPORTED);
|
||||
@ -464,8 +459,6 @@ static int menu_cbs_init_bind_deferred_push_compare_label(menu_file_list_cbs_t *
|
||||
{
|
||||
if (strstr(label, "deferred_rdb_entry_detail"))
|
||||
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
||||
else if (strstr(label, "deferred_rpl_entry_actions"))
|
||||
cbs->action_deferred_push = deferred_push_rpl_entry_actions;
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
|
@ -437,7 +437,6 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_CARCHIVE:
|
||||
case MENU_FILE_CORE:
|
||||
case MENU_FILE_RDB:
|
||||
case MENU_FILE_RPL_ENTRY:
|
||||
case MENU_FILE_RDB_ENTRY:
|
||||
case MENU_FILE_CURSOR:
|
||||
case MENU_FILE_SHADER:
|
||||
|
@ -938,31 +938,6 @@ static int action_ok_rdb_entry(const char *path,
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);
|
||||
}
|
||||
|
||||
static int action_ok_rpl_entry(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
char tmp[PATH_MAX_LENGTH] = {0};
|
||||
menu_displaylist_info_t info = {0};
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
|
||||
strlcpy(menu->deferred_path, label, sizeof(menu->deferred_path));
|
||||
|
||||
strlcpy(tmp, "deferred_rpl_entry_actions|", sizeof(tmp));
|
||||
strlcat(tmp, path, sizeof(tmp));
|
||||
|
||||
info.list = menu_list->menu_stack;
|
||||
info.type = 0;
|
||||
info.directory_ptr = idx;
|
||||
|
||||
strlcpy(info.path, label, sizeof(info.path));
|
||||
strlcpy(info.label, tmp, sizeof(info.label));
|
||||
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);
|
||||
}
|
||||
|
||||
static int action_ok_cursor_manager_list_deferred(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -1337,6 +1312,27 @@ static int action_ok_screenshot(const char *path,
|
||||
return generic_action_ok_command(EVENT_CMD_TAKE_SCREENSHOT);
|
||||
}
|
||||
|
||||
static int action_ok_file_load_or_resume(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (!menu)
|
||||
return -1;
|
||||
|
||||
if (!strcmp(menu->deferred_path, global->fullpath))
|
||||
return generic_action_ok_command(EVENT_CMD_RESUME);
|
||||
else
|
||||
{
|
||||
strlcpy(global->fullpath,
|
||||
menu->deferred_path, sizeof(global->fullpath));
|
||||
event_command(EVENT_CMD_LOAD_CORE);
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_LOAD_CONTENT);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int action_ok_shader_apply_changes(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -1531,6 +1527,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_TAKE_SCREENSHOT:
|
||||
cbs->action_ok = action_ok_screenshot;
|
||||
break;
|
||||
case MENU_LABEL_FILE_LOAD_OR_RESUME:
|
||||
cbs->action_ok = action_ok_file_load_or_resume;
|
||||
break;
|
||||
case MENU_LABEL_QUIT_RETROARCH:
|
||||
cbs->action_ok = action_ok_quit;
|
||||
break;
|
||||
@ -1740,9 +1739,6 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_RDB_ENTRY:
|
||||
cbs->action_ok = action_ok_rdb_entry;
|
||||
break;
|
||||
case MENU_FILE_RPL_ENTRY:
|
||||
cbs->action_ok = action_ok_rpl_entry;
|
||||
break;
|
||||
case MENU_FILE_CURSOR:
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
|
@ -371,7 +371,6 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_CARCHIVE:
|
||||
case MENU_FILE_CORE:
|
||||
case MENU_FILE_RDB:
|
||||
case MENU_FILE_RPL_ENTRY:
|
||||
case MENU_FILE_RDB_ENTRY:
|
||||
case MENU_FILE_CURSOR:
|
||||
case MENU_FILE_SHADER:
|
||||
|
@ -985,8 +985,6 @@ static GLuint xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
return xmb->textures.list[XMB_TEXTURE_FOLDER].id;
|
||||
case MENU_FILE_PLAIN:
|
||||
return xmb->textures.list[XMB_TEXTURE_FILE].id;
|
||||
case MENU_FILE_RPL_ENTRY:
|
||||
case MENU_FILE_RDB_ENTRY:
|
||||
case MENU_FILE_PLAYLIST_ENTRY:
|
||||
if (xmb->boxart && active && node && node->zoom == 1)
|
||||
return xmb->boxart;
|
||||
|
@ -85,7 +85,6 @@ typedef enum
|
||||
MENU_FILE_DOWNLOAD_CORE_INFO,
|
||||
MENU_FILE_RDB,
|
||||
MENU_FILE_RDB_ENTRY,
|
||||
MENU_FILE_RPL_ENTRY,
|
||||
MENU_FILE_CURSOR,
|
||||
MENU_FILE_RECORD_CONFIG,
|
||||
MENU_FILE_PLAYLIST_COLLECTION,
|
||||
|
@ -657,9 +657,18 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_history)
|
||||
if (!is_history && core_detected && db_name[0] != '\0')
|
||||
{
|
||||
char db_path[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
fill_pathname_join(db_path, settings->content_database,
|
||||
db_name, sizeof(db_path));
|
||||
path_remove_extension(db_path);
|
||||
strlcat(db_path, ".rdb", sizeof(db_path));
|
||||
|
||||
menu_list_push(info->list, label,
|
||||
path, MENU_FILE_RPL_ENTRY, 0, i);
|
||||
db_path, MENU_FILE_RDB_ENTRY, 0, i);
|
||||
}
|
||||
else
|
||||
menu_list_push(info->list, fill_buf, path_playlist,
|
||||
MENU_FILE_PLAYLIST_ENTRY, 0, i);
|
||||
@ -1377,7 +1386,7 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in
|
||||
!strcmp(menu->deferred_path, global->fullpath))
|
||||
{
|
||||
menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_RESUME_CONTENT),
|
||||
"resume_content", MENU_SETTING_ACTION_RUN, 0, 0);
|
||||
"file_load_or_resume", MENU_SETTING_ACTION_RUN, 0, 0);
|
||||
menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_SAVE_STATE),
|
||||
"savestate", MENU_SETTING_ACTION_SAVESTATE, 0, 0);
|
||||
menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_LOAD_STATE),
|
||||
@ -1392,11 +1401,7 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in
|
||||
MENU_SETTING_ACTION_RESET, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO Here, push a list of cores instead of run
|
||||
// but display Run if the core is detected in the playlist
|
||||
menu_list_push(info->list, "Run", "", MENU_SETTING_ACTION_RUN, 0, 0);
|
||||
}
|
||||
menu_list_push(info->list, "Run", "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -384,6 +384,7 @@ extern "C" {
|
||||
#define MENU_LABEL_VALUE_RESUME 0xce8ac2f6U
|
||||
#define MENU_LABEL_RESTART_CONTENT 0x1ea2e224U
|
||||
#define MENU_LABEL_TAKE_SCREENSHOT 0x6786e867U
|
||||
#define MENU_LABEL_FILE_LOAD_OR_RESUME 0x952941f4U
|
||||
#define MENU_LABEL_DISK_IMAGE_APPEND 0x5af7d709U
|
||||
#define MENU_LABEL_CONFIGURATIONS 0x3e930a50U
|
||||
#define MENU_LABEL_CHEAT_FILE_SAVE_AS 0x1f58dccaU
|
||||
|
Loading…
Reference in New Issue
Block a user