Merge pull request #1825 from libretro/revert-1824-contextual

Revert "(XMB) Start re-implementing the Run entry"
This commit is contained in:
Twinaphex 2015-06-18 20:57:04 +02:00
commit 89902543c3
3 changed files with 5 additions and 37 deletions

View File

@ -1319,21 +1319,6 @@ static int action_ok_save_new_config(const char *path,
return generic_action_ok_command(EVENT_CMD_MENU_SAVE_CONFIG);
}
static int action_ok_start_content(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;
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_resume_content(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@ -1540,9 +1525,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_LABEL_RESUME_CONTENT:
cbs->action_ok = action_ok_resume_content;
break;
case MENU_LABEL_START_CONTENT:
cbs->action_ok = action_ok_start_content;
break;
case MENU_LABEL_RESTART_CONTENT:
cbs->action_ok = action_ok_restart_content;
break;

View File

@ -619,6 +619,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
uint32_t core_name_hash;
char fill_buf[PATH_MAX_LENGTH] = {0};
char path_copy[PATH_MAX_LENGTH] = {0};
bool core_detected = false;
const char *core_name = NULL;
const char *db_name = NULL;
const char *path = NULL;
@ -651,6 +652,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
char tmp[PATH_MAX_LENGTH] = {0};
snprintf(tmp, sizeof(tmp), " (%s)", core_name);
strlcat(fill_buf, tmp, sizeof(fill_buf));
core_detected = true;
}
}
}
@ -1312,7 +1314,6 @@ static int menu_displaylist_parse_horizontal_list(menu_displaylist_info_t *info)
fill_pathname_join(path_playlist,
settings->playlist_directory, item->path,
sizeof(path_playlist));
menu->playlist = content_playlist_init(path_playlist,
999);
strlcpy(menu->db_playlist_file, path_playlist, sizeof(menu->db_playlist_file));
@ -1369,7 +1370,6 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in
{
menu_handle_t *menu = menu_driver_get_ptr();
global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr();
if (!menu)
return -1;
@ -1393,22 +1393,9 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in
}
else
{
unsigned idx = 0; // TODO get this value dynamically
const char *core_name = NULL;
const char *core_path = NULL;
content_playlist_get_index(menu->playlist, idx,
NULL, NULL, &core_path, &core_name, NULL, NULL);
if (!strcmp(core_name, "DETECT"))
{
menu_list_push(info->list, "TODO: Core selection", "", MENU_SETTING_ACTION_RUN, 0, 0);
}
else
{
strlcpy(settings->libretro, core_path, sizeof(settings->libretro));
menu_list_push(info->list, "Run", "start_content", MENU_SETTING_ACTION_RUN, 0, 0);
}
// 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);
}
return 0;

View File

@ -380,7 +380,6 @@ extern "C" {
#define MENU_LABEL_CUSTOM_BIND_DEFAULTS 0xe88f7b13U
#define MENU_LABEL_SAVESTATE 0x3a4849b5U
#define MENU_LABEL_LOADSTATE 0xa39eb286U
#define MENU_LABEL_START_CONTENT 0xdc53686dU
#define MENU_LABEL_RESUME_CONTENT 0xd9f088b0U
#define MENU_LABEL_VALUE_RESUME 0xce8ac2f6U
#define MENU_LABEL_RESTART_CONTENT 0x1ea2e224U