mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 18:45:45 +00:00
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.
This commit is contained in:
parent
cd9570ce0d
commit
de9051633c
8 changed files with 26 additions and 40 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue