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/yuzu/main.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/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0a6839b2d..62f9d2ab2 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2116,7 +2116,7 @@ void GMainWindow::OnReinitializeKeys(ReinitializeKeyBehavior behavior) { "title.keys_autogenerated"); } - Core::Crypto::KeyManager keys{}; + Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::instance(); if (keys.BaseDeriveNecessary()) { Core::Crypto::PartitionDataManager pdm{vfs->OpenDirectory( FileUtil::GetUserPath(FileUtil::UserPath::SysDataDir), FileSys::Mode::Read)}; |