diff options
| author | 2023-06-03 14:27:08 -0400 | |
|---|---|---|
| committer | 2023-06-03 14:27:08 -0400 | |
| commit | a75bc759fe1459214aedcc3875209a9e4384a693 (patch) | |
| tree | 5ed3eb6417e7c2ef5a68b567aab692ddb7b43c4f /src | |
| parent | Update README.md (Add Android at builds description) (#10586) (diff) | |
| download | yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.gz yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.xz yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.zip | |
fsp-srv: avoid patching romfs multiple times
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index f73a864c3..427dbc8b3 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -968,16 +968,20 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequ | |||
| 968 | void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) { | 968 | void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) { |
| 969 | LOG_DEBUG(Service_FS, "called"); | 969 | LOG_DEBUG(Service_FS, "called"); |
| 970 | 970 | ||
| 971 | auto current_romfs = fsc.OpenRomFSCurrentProcess(); | 971 | if (!romfs) { |
| 972 | if (current_romfs.Failed()) { | 972 | auto current_romfs = fsc.OpenRomFSCurrentProcess(); |
| 973 | // TODO (bunnei): Find the right error code to use here | 973 | if (current_romfs.Failed()) { |
| 974 | LOG_CRITICAL(Service_FS, "no file system interface available!"); | 974 | // TODO (bunnei): Find the right error code to use here |
| 975 | IPC::ResponseBuilder rb{ctx, 2}; | 975 | LOG_CRITICAL(Service_FS, "no file system interface available!"); |
| 976 | rb.Push(ResultUnknown); | 976 | IPC::ResponseBuilder rb{ctx, 2}; |
| 977 | return; | 977 | rb.Push(ResultUnknown); |
| 978 | return; | ||
| 979 | } | ||
| 980 | |||
| 981 | romfs = current_romfs.Unwrap(); | ||
| 978 | } | 982 | } |
| 979 | 983 | ||
| 980 | auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap())); | 984 | auto storage = std::make_shared<IStorage>(system, romfs); |
| 981 | 985 | ||
| 982 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 986 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 983 | rb.Push(ResultSuccess); | 987 | rb.Push(ResultSuccess); |