(360) Load Game History list now works on 360 as well

This commit is contained in:
twinaphex 2013-05-10 22:44:58 +02:00
parent f1358e1643
commit 523a27ce61
3 changed files with 32 additions and 3 deletions

View File

@ -472,6 +472,16 @@ static void init_menulist(unsigned menu_id)
HRESULT CRetroArchLoadGameHistory::OnControlNavigate(
XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled)
{
unsigned current_index = XuiListGetCurSel(m_menulist, NULL);
unsigned input = pControlNavigateData->nControlNavigate;
if (input == XUI_CONTROL_NAVIGATE_OK)
{
load_menu_game_history(current_index);
process_input_ret = -1;
}
bHandled = TRUE;
switch(pControlNavigateData->nControlNavigate)

View File

@ -267,7 +267,7 @@ static int system_process_args(int argc, char *argv[])
(void)argc;
(void)argv;
#ifdef _XBOX1
#if defined(_XBOX1)
LAUNCH_DATA ptr;
DWORD launch_type;
@ -282,6 +282,19 @@ static int system_process_args(int argc, char *argv[])
return 1;
}
}
#elif defined(_XBOX360)
DWORD dwLaunchDataSize;
if (XGetLaunchDataSize(&dwLaunchDataSize) == ERROR_SUCCESS)
{
BYTE* pLaunchData = new BYTE[dwLaunchDataSize];
XGetLaunchData(pLaunchData, dwLaunchDataSize);
snprintf(g_extern.fullpath, sizeof(g_extern.fullpath), "%s", (char*)pLaunchData);
RARCH_LOG("Auto-start game %s.\n", g_extern.fullpath);
delete []pLaunchData;
return 1;
}
#endif
return 0;
}

View File

@ -28,7 +28,7 @@ static void rarch_console_exec(const char *path, bool should_load_game)
#ifdef IS_SALAMANDER
XLaunchNewImage(path, NULL);
#else
#ifdef _XBOX1
#if defined(_XBOX1)
LAUNCH_DATA ptr;
memset(&ptr, 0, sizeof(ptr));
if (should_load_game)
@ -38,7 +38,13 @@ static void rarch_console_exec(const char *path, bool should_load_game)
}
else
XLaunchNewImage(path, NULL);
#else
#elif defined(_XBOX360)
char game_path[1024];
if (should_load_game)
{
strlcpy(game_path, g_extern.fullpath, sizeof(game_path));
XSetLaunchData(game_path, MAX_LAUNCH_DATA_SIZE);
}
XLaunchNewImage(path, NULL);
#endif
#endif