mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 18:07:57 -05:00
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.
This commit is contained in:
@ -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)};
|
||||
|
Reference in New Issue
Block a user