mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 10:20:41 +00:00
Merge pull request #11529 from libretro/revert-11526-master
Revert "VITA: fix crash when started with missing boot params"
This commit is contained in:
commit
16e5131d29
@ -342,30 +342,25 @@ static void frontend_psp_exec(const char *path, bool should_load_game)
|
|||||||
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
||||||
#if defined(VITA)
|
#if defined(VITA)
|
||||||
RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp);
|
RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp);
|
||||||
int ret;
|
|
||||||
#ifdef IS_SALAMANDER
|
#ifdef IS_SALAMANDER
|
||||||
sceAppMgrGetAppParam(boot_params);
|
sceAppMgrGetAppParam(boot_params);
|
||||||
if (strstr(boot_params,"psgm:play"))
|
if (strstr(boot_params,"psgm:play"))
|
||||||
{
|
{
|
||||||
char *param1 = strstr(boot_params, "¶m=");
|
int ret;
|
||||||
|
char *param1 = strstr(boot_params, "¶m=")+7;
|
||||||
char *param2 = strstr(boot_params, "¶m2=");
|
char *param2 = strstr(boot_params, "¶m2=");
|
||||||
if (param1 != NULL && param2 != NULL)
|
memcpy(core_name, param1, param2 - param1);
|
||||||
{
|
core_name[param2-param1] = 0;
|
||||||
param1 += 7;
|
sprintf(argp, param2 + 8);
|
||||||
memcpy(core_name, param1, param2 - param1);
|
ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL);
|
||||||
core_name[param2-param1] = 0;
|
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
||||||
sprintf(argp, param2 + 8);
|
|
||||||
ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL);
|
|
||||||
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
RARCH_LOG("Required boot params missing. Continue nornal boot.");
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
ret = sceAppMgrLoadExec(path, args == 0 ? NULL : (char * const*)((const char*[]){argp, 0}), NULL);
|
{
|
||||||
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
int ret = sceAppMgrLoadExec(path, args == 0 ? NULL : (char * const*)((const char*[]){argp, 0}), NULL);
|
||||||
|
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
||||||
exit:
|
}
|
||||||
#else
|
#else
|
||||||
exitspawn_kernel(path, args, argp);
|
exitspawn_kernel(path, args, argp);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user