mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-11-25 19:36:53 +01:00
Add RL_UnmountCurrentRunningBundle
export
This commit is contained in:
parent
cf61f8ce0f
commit
a18a28091b
@ -245,12 +245,28 @@ int32_t RL_UnmountBundle(const char *name) {
|
|||||||
return romfsUnmount(name);
|
return romfsUnmount(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RL_UnmountCurrentRunningBundle(){
|
||||||
|
if(gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted == false){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE) {
|
||||||
|
if (gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) {
|
||||||
|
DEBUG_FUNCTION_LINE("Unmount /vol/content");
|
||||||
|
romfsUnmount("rom");
|
||||||
|
gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted = false;
|
||||||
|
DCFlushRange(&gReplacementInfo, sizeof(gReplacementInfo));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t RL_FileOpen(const char *name, uint32_t *handle) {
|
int32_t RL_FileOpen(const char *name, uint32_t *handle) {
|
||||||
if (handle == nullptr) {
|
if (handle == nullptr) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileReader *reader = nullptr;
|
FileReader *reader;
|
||||||
std::string path = std::string(name);
|
std::string path = std::string(name);
|
||||||
std::string pathGZ = path + ".gz";
|
std::string pathGZ = path + ".gz";
|
||||||
|
|
||||||
@ -316,3 +332,4 @@ WUMS_EXPORT_FUNCTION(RL_FileClose);
|
|||||||
WUMS_EXPORT_FUNCTION(RL_FileExists);
|
WUMS_EXPORT_FUNCTION(RL_FileExists);
|
||||||
WUMS_EXPORT_FUNCTION(RL_RedirectContentWithFallback);
|
WUMS_EXPORT_FUNCTION(RL_RedirectContentWithFallback);
|
||||||
WUMS_EXPORT_FUNCTION(RL_DisableContentRedirection);
|
WUMS_EXPORT_FUNCTION(RL_DisableContentRedirection);
|
||||||
|
WUMS_EXPORT_FUNCTION(RL_UnmountCurrentRunningBundle);
|
@ -13,7 +13,6 @@ public:
|
|||||||
explicit FileReaderCompressed(std::string &file);
|
explicit FileReaderCompressed(std::string &file);
|
||||||
|
|
||||||
~FileReaderCompressed() override {
|
~FileReaderCompressed() override {
|
||||||
DEBUG_FUNCTION_LINE("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int read(uint8_t *buffer, uint32_t size) override;
|
int read(uint8_t *buffer, uint32_t size) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user