mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-23 11:41:22 -08:00
fsp-srv: avoid patching romfs multiple times
This commit is contained in:
parent
58c54aecb6
commit
a75bc759fe
@ -968,16 +968,20 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequ
|
|||||||
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_FS, "called");
|
LOG_DEBUG(Service_FS, "called");
|
||||||
|
|
||||||
auto current_romfs = fsc.OpenRomFSCurrentProcess();
|
if (!romfs) {
|
||||||
if (current_romfs.Failed()) {
|
auto current_romfs = fsc.OpenRomFSCurrentProcess();
|
||||||
// TODO (bunnei): Find the right error code to use here
|
if (current_romfs.Failed()) {
|
||||||
LOG_CRITICAL(Service_FS, "no file system interface available!");
|
// TODO (bunnei): Find the right error code to use here
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
LOG_CRITICAL(Service_FS, "no file system interface available!");
|
||||||
rb.Push(ResultUnknown);
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
return;
|
rb.Push(ResultUnknown);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
romfs = current_romfs.Unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
|
auto storage = std::make_shared<IStorage>(system, romfs);
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
Loading…
Reference in New Issue
Block a user