diff options
author | Lioncash <mathew1800@gmail.com> | 2018-12-01 20:32:38 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-12-01 23:43:23 -0500 |
commit | db4523f1ece642475d58f8764863c8930a0812e3 (patch) | |
tree | 53a96ed05770f77a1dd9bb463863c38e3dffa36c /src/yuzu/main.cpp | |
parent | e88cdcc912ae6929f9008c1b307c62f1e7b0637f (diff) |
filesystem: De-globalize registered_cache_union
We can just return a new instance of this when it's requested. This only
ever holds pointers to the existing registed caches, so it's not a large
object. Plus, this also gets rid of the need to keep around a separate
member function just to properly clear out the union.
Gets rid of one of five globals in the filesystem code.
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 93bf117c82..6e7d300a0f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -905,7 +905,7 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa } const auto installed = Service::FileSystem::GetUnionContents(); - auto romfs_title_id = SelectRomFSDumpTarget(*installed, program_id); + const auto romfs_title_id = SelectRomFSDumpTarget(installed, program_id); if (!romfs_title_id) { failed(); @@ -920,7 +920,7 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa if (*romfs_title_id == program_id) { romfs = file; } else { - romfs = installed->GetEntry(*romfs_title_id, FileSys::ContentRecordType::Data)->GetRomFS(); + romfs = installed.GetEntry(*romfs_title_id, FileSys::ContentRecordType::Data)->GetRomFS(); } const auto extracted = FileSys::ExtractRomFS(romfs, FileSys::RomFSExtractionType::Full); |