Fix /vol/save redirection for .wuhb files

This commit is contained in:
Maschell 2021-08-09 18:50:40 +02:00
parent 661a79e116
commit 05120c8934
2 changed files with 5 additions and 1 deletions

View File

@ -216,6 +216,7 @@ bool RL_LoadFromSDOnNextLaunch(const char *bundle_path) {
completePath.c_str(),
sizeof(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath) - 1);
gReplacementInfo.contentReplacementInfo.mode = CONTENTREDIRECT_FROM_WUHB_BUNDLE;
gReplacementInfo.contentReplacementInfo.replaceSave = true;
} else {
DEBUG_FUNCTION_LINE("Loaded file is no bundle");
gReplacementInfo.rpxReplacementInfo.willRPXBeReplaced = true;
@ -227,6 +228,8 @@ bool RL_LoadFromSDOnNextLaunch(const char *bundle_path) {
strncat(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath,
gReplacementInfo.contentReplacementInfo.bundleMountInformation.mountedPath,
sizeof(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath) - 1);
} else {
gReplacementInfo.contentReplacementInfo.replaceSave = false;
}
}

View File

@ -61,8 +61,9 @@ WUMS_APPLICATION_STARTS() {
}
if (_SYSGetSystemApplicationTitleId(SYSTEM_APP_ID_HEALTH_AND_SAFETY) != OSGetTitleID()) {
DEBUG_FUNCTION_LINE("Set gTryToReplaceOnNextLaunch, gReplacedRPX and gIsMounted to FALSE");
DEBUG_FUNCTION_LINE("Set mode to CONTENTREDIRECT_NONE and replaceSave to false");
gReplacementInfo.contentReplacementInfo.mode = CONTENTREDIRECT_NONE;
gReplacementInfo.contentReplacementInfo.replaceSave = false;
DCFlushRange(&gReplacementInfo, sizeof(gReplacementInfo));
} else {
if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE) {