diff --git a/frontend/platform/platform_xdk.c b/frontend/platform/platform_xdk.c index c5cfd41d17..8a16182a16 100644 --- a/frontend/platform/platform_xdk.c +++ b/frontend/platform/platform_xdk.c @@ -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; } diff --git a/frontend/platform/platform_xdk_exec.c b/frontend/platform/platform_xdk_exec.c index 1b81ccfa07..91e94d8068 100644 --- a/frontend/platform/platform_xdk_exec.c +++ b/frontend/platform/platform_xdk_exec.c @@ -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 + }