mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-11-16 15:09:17 +01:00
Keep /vol/content mounted if loading into a .rpx
This commit is contained in:
parent
e09a655485
commit
d7228d4520
@ -21,7 +21,9 @@ bool loadRPXFromSDOnNextLaunch(const std::string &path) {
|
|||||||
|
|
||||||
std::string completePath = "/vol/external01/" + path;
|
std::string completePath = "/vol/external01/" + path;
|
||||||
int res = getRPXInfoForPath(completePath, &info);
|
int res = getRPXInfoForPath(completePath, &info);
|
||||||
|
bool isBundle = false;
|
||||||
if (res >= 0) {
|
if (res >= 0) {
|
||||||
|
isBundle = true;
|
||||||
request.filesize = ((uint32_t * ) & info.length)[1];
|
request.filesize = ((uint32_t * ) & info.length)[1];
|
||||||
request.fileoffset = ((uint32_t * ) & info.offset)[1];
|
request.fileoffset = ((uint32_t * ) & info.offset)[1];
|
||||||
} else {
|
} else {
|
||||||
@ -41,9 +43,20 @@ bool loadRPXFromSDOnNextLaunch(const std::string &path) {
|
|||||||
IOS_Close(mcpFd);
|
IOS_Close(mcpFd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isBundle){
|
||||||
gTryToReplaceOnNextLaunch = true;
|
gTryToReplaceOnNextLaunch = true;
|
||||||
memset(gLoadedBundlePath,0, sizeof(gLoadedBundlePath));
|
memset(gLoadedBundlePath,0, sizeof(gLoadedBundlePath));
|
||||||
strncpy(gLoadedBundlePath, completePath.c_str(), completePath.length());
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user