aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/content_archive.cpp
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2020-05-20 21:28:16 +0200
committerFearlessTobi <thm.frey@gmail.com>2020-05-20 21:28:16 +0200
commit9f82a9a2444a232e746992fa89084b928255cb63 (patch)
tree2d26c90e5bb2edf975afe511f9999beca8c48382 /src/core/file_sys/content_archive.cpp
parent41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa (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/content_archive.cpp')
-rw-r--r--src/core/file_sys/content_archive.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp
index b8bbdd1ef..473245d5a 100644
--- a/src/core/file_sys/content_archive.cpp
+++ b/src/core/file_sys/content_archive.cpp
@@ -118,9 +118,8 @@ static bool IsValidNCA(const NCAHeader& header) {
return header.magic == Common::MakeMagic('N', 'C', 'A', '3');
}
-NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_offset,
- Core::Crypto::KeyManager keys_)
- : file(std::move(file_)), bktr_base_romfs(std::move(bktr_base_romfs_)), keys(std::move(keys_)) {
+NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_offset)
+ : file(std::move(file_)), bktr_base_romfs(std::move(bktr_base_romfs_)) {
if (file == nullptr) {
status = Loader::ResultStatus::ErrorNullFile;
return;