pm: fix handling of PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM
This commit is contained in:
parent
2834bae318
commit
814792eb91
@ -219,18 +219,18 @@ static Result launchTitleImpl(Handle *debug, ProcessData **outProcessData, const
|
|||||||
if (IS_N3DS && APPMEMTYPE == 6 && (launchFlags & PMLAUNCHFLAG_NORMAL_APPLICATION) != 0) {
|
if (IS_N3DS && APPMEMTYPE == 6 && (launchFlags & PMLAUNCHFLAG_NORMAL_APPLICATION) != 0) {
|
||||||
u32 limitMb;
|
u32 limitMb;
|
||||||
SystemMode n3dsSystemMode = exheaderInfo->aci.local_caps.core_info.n3ds_system_mode;
|
SystemMode n3dsSystemMode = exheaderInfo->aci.local_caps.core_info.n3ds_system_mode;
|
||||||
if ((launchFlags & PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM) || n3dsSystemMode == SYSMODE_O3DS_PROD) {
|
bool forceO3dsAppMem = (launchFlags & PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM) != 0;
|
||||||
if ((launchFlags & PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM) & PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM) {
|
if (forceO3dsAppMem && (launchFlags & PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM) != 0) {
|
||||||
limitMb = 96;
|
setAppMemLimit(96 << 20);
|
||||||
} else {
|
} else if (forceO3dsAppMem || n3dsSystemMode == SYSMODE_O3DS_PROD) {
|
||||||
switch (exheaderInfo->aci.local_caps.core_info.o3ds_system_mode) {
|
switch (exheaderInfo->aci.local_caps.core_info.o3ds_system_mode) {
|
||||||
case SYSMODE_O3DS_PROD: limitMb = 64; break;
|
case SYSMODE_O3DS_PROD: limitMb = 64; break;
|
||||||
case SYSMODE_DEV1: limitMb = 96; break;
|
case SYSMODE_DEV1: limitMb = 96; break;
|
||||||
case SYSMODE_DEV2: limitMb = 80; break;
|
case SYSMODE_DEV2: limitMb = 80; break;
|
||||||
default: limitMb = 0; break;
|
default: limitMb = 0; break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Can be 0:
|
||||||
setAppMemLimit(limitMb << 20);
|
setAppMemLimit(limitMb << 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user