(XDK1) Load Game (History) works now on Xbox 1

This commit is contained in:
twinaphex 2013-04-29 18:05:48 +02:00
parent eeaa53b127
commit 8f2ed9a405
2 changed files with 34 additions and 1 deletions

View File

@ -266,6 +266,23 @@ static int system_process_args(int argc, char *argv[])
{
(void)argc;
(void)argv;
#ifdef _XBOX1
LAUNCH_DATA ptr;
DWORD launch_type;
if (XGetLaunchInfo(&launch_type, &ptr) == ERROR_SUCCESS)
{
if (launch_type == LDT_FROM_DEBUGGER_CMDLINE)
RARCH_LOG("Launched from commandline debugger.\n");
else
{
snprintf(g_extern.fullpath, sizeof(g_extern.fullpath), (char*)ptr.Data);
RARCH_LOG("Auto-start game %s.\n", g_extern.fullpath);
return 1;
}
}
#endif
return 0;
}

View File

@ -23,7 +23,23 @@
static void rarch_console_exec(const char *path, bool should_load_game)
{
(void)should_load_game;
RARCH_LOG("Attempt to load executable: [%s].\n", path);
RARCH_LOG("Attempt to load executable: [%s].\n", path);
#ifdef IS_SALAMANDER
XLaunchNewImage(path, NULL);
#else
#ifdef _XBOX1
LAUNCH_DATA ptr;
memset(&ptr, 0, sizeof(ptr));
if (should_load_game)
{
snprintf((char*)ptr.Data, sizeof(ptr.Data), "%s", g_extern.fullpath);
XLaunchNewImage(path, &ptr);
}
XLaunchNewImage(path, NULL);
#else
XLaunchNewImage(path, NULL);
#endif
#endif
}