diff options
| author | FearlessTobi <thm.frey@gmail.com> | 2020-05-20 21:28:16 +0200 |
|---|---|---|
| committer | FearlessTobi <thm.frey@gmail.com> | 2020-05-20 21:28:16 +0200 |
| commit | 9f82a9a2444a232e746992fa89084b928255cb63 (patch) | |
| tree | 2d26c90e5bb2edf975afe511f9999beca8c48382 /src/core/file_sys/registered_cache.cpp | |
| parent | 41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa (diff) | |
crypto: Make KeyManager a singleton class
Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list.
With this change, it is only loaded once.
On my system, this decreased game list loading times by a factor of 20.
Diffstat (limited to 'src/core/file_sys/registered_cache.cpp')
| -rw-r--r-- | src/core/file_sys/registered_cache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index ba5f76288..27c1b0233 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -408,7 +408,7 @@ void RegisteredCache::ProcessFiles(const std::vector<NcaID>& ids) { if (file == nullptr) continue; - const auto nca = std::make_shared<NCA>(parser(file, id), nullptr, 0, keys); + const auto nca = std::make_shared<NCA>(parser(file, id), nullptr, 0); if (nca->GetStatus() != Loader::ResultStatus::Success || nca->GetType() != NCAContentType::Meta) { continue; @@ -486,7 +486,7 @@ std::unique_ptr<NCA> RegisteredCache::GetEntry(u64 title_id, ContentRecordType t const auto raw = GetEntryRaw(title_id, type); if (raw == nullptr) return nullptr; - return std::make_unique<NCA>(raw, nullptr, 0, keys); + return std::make_unique<NCA>(raw, nullptr, 0); } template <typename T> @@ -865,7 +865,7 @@ std::unique_ptr<NCA> ManualContentProvider::GetEntry(u64 title_id, ContentRecord const auto res = GetEntryRaw(title_id, type); if (res == nullptr) return nullptr; - return std::make_unique<NCA>(res, nullptr, 0, keys); + return std::make_unique<NCA>(res, nullptr, 0); } std::vector<ContentProviderEntry> ManualContentProvider::ListEntriesFilter( |
