Keep /vol/content mounted if loading into a .rpx

This commit is contained in:
Maschell 2021-01-09 21:23:48 +01:00
parent e09a655485
commit d7228d4520

View File

@ -21,7 +21,9 @@ bool loadRPXFromSDOnNextLaunch(const std::string &path) {
std::string completePath = "/vol/external01/" + path;
int res = getRPXInfoForPath(completePath, &info);
bool isBundle = false;
if (res >= 0) {
isBundle = true;
request.filesize = ((uint32_t * ) & info.length)[1];
request.fileoffset = ((uint32_t * ) & info.offset)[1];
} else {
@ -41,9 +43,20 @@ bool loadRPXFromSDOnNextLaunch(const std::string &path) {
IOS_Close(mcpFd);
}
if(isBundle){
gTryToReplaceOnNextLaunch = true;
memset(gLoadedBundlePath,0, sizeof(gLoadedBundlePath));
strncpy(gLoadedBundlePath, completePath.c_str(), completePath.length());
}else {
if (!gIsMounted) {
gTryToReplaceOnNextLaunch = false;
memset(gLoadedBundlePath, 0, sizeof(gLoadedBundlePath));
} else {
// keep the old /vol/content mounted, this way you can reload just the rpx via wiiload
gTryToReplaceOnNextLaunch = true;
}
}
return true;
}