mirror of
https://github.com/libretro/RetroArch
synced 2025-02-10 12:40:03 +00:00
(PS3) Load Game History works on PS3 - Multiman will from now on
have to supply its own SELF path to argv[2] in order to work
This commit is contained in:
parent
455167ec19
commit
ded204ce19
@ -200,7 +200,8 @@ static void get_environment_settings(int argc, char *argv[])
|
||||
|
||||
#ifdef HAVE_MULTIMAN
|
||||
/* not launched from external launcher, set default path */
|
||||
if(path_file_exists(MULTIMAN_SELF_FILE) && argc > 1 && path_file_exists(argv[1]))
|
||||
// second param is multiMAN SELF file
|
||||
if(path_file_exists(argv[2]) && argc > 1 && (strcmp(argv[2], EMULATOR_CONTENT_DIR) == 0))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXTLAUNCH_MULTIMAN);
|
||||
RARCH_LOG("Started from multiMAN, auto-game start enabled.\n");
|
||||
@ -341,17 +342,14 @@ static void system_init(void)
|
||||
|
||||
static int system_process_args(int argc, char *argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
#ifdef HAVE_MULTIMAN
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_EXTLAUNCH_MULTIMAN))
|
||||
if (argc > 1)
|
||||
{
|
||||
RARCH_LOG("Started from multiMAN, will auto-start game.\n");
|
||||
RARCH_LOG("Auto-start game %s.\n", argv[1]);
|
||||
strlcpy(g_extern.fullpath, argv[1], sizeof(g_extern.fullpath));
|
||||
ret = 1;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void system_deinit(void)
|
||||
|
@ -31,16 +31,19 @@ static void rarch_console_exec(const char *path, bool should_load_game)
|
||||
|
||||
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
||||
char spawn_data[256];
|
||||
char game_path[256];
|
||||
for(unsigned int i = 0; i < sizeof(spawn_data); ++i)
|
||||
spawn_data[i] = i & 0xff;
|
||||
|
||||
char spawn_data_size[16];
|
||||
snprintf(spawn_data_size, sizeof(spawn_data_size), "%d", 256);
|
||||
#ifndef IS_SALAMANDER
|
||||
if (should_load_game)
|
||||
strlcpy(game_path, g_extern.fullpath, sizeof(game_path));
|
||||
#endif
|
||||
|
||||
const char * const spawn_argv[] = {
|
||||
spawn_data_size,
|
||||
"test argv for",
|
||||
"sceNpDrmProcessExitSpawn2()",
|
||||
#ifndef IS_SALAMANDER
|
||||
game_path,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -50,7 +53,7 @@ static void rarch_console_exec(const char *path, bool should_load_game)
|
||||
if(ret < 0)
|
||||
{
|
||||
RARCH_WARN("SELF file is not of NPDRM type, trying another approach to boot it...\n");
|
||||
sys_game_process_exitspawn(path, NULL, NULL, NULL, 0, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M);
|
||||
sys_game_process_exitspawn(path, (const char** const)spawn_argv, NULL, NULL, 0, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M);
|
||||
}
|
||||
|
||||
sceNpTerm();
|
||||
|
Loading…
x
Reference in New Issue
Block a user