From 05120c8934cc3a59ad5fef067c050f0ba9cee4ad Mon Sep 17 00:00:00 2001 From: Maschell Date: Mon, 9 Aug 2021 18:50:40 +0200 Subject: [PATCH] Fix /vol/save redirection for .wuhb files --- src/RPXLoading.cpp | 3 +++ src/main.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/RPXLoading.cpp b/src/RPXLoading.cpp index dacf160..93cd2ad 100644 --- a/src/RPXLoading.cpp +++ b/src/RPXLoading.cpp @@ -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; } } diff --git a/src/main.cpp b/src/main.cpp index 1805d46..2c1a97d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) {