refactor: rename PopulateTickets to ReloadTickets for clarity and update usage in FileSystemController

This commit is contained in:
bdm
2026-06-30 21:42:11 +08:00
parent 6932641010
commit ce4701d872
4 changed files with 17 additions and 3 deletions
+1 -1
View File
@@ -5392,7 +5392,7 @@ void GMainWindow::OnInstallDecryptionKeys() {
// and re-populate the game list in the UI if the user has already added
// game folders.
Core::Crypto::KeyManager::Instance().ReloadKeys();
Core::Crypto::KeyManager::Instance().PopulateTickets();
Core::Crypto::KeyManager::Instance().ReloadTickets();
system->GetFileSystemController().InitializeContentSystem(*vfs);
game_list->PopulateAsync(UISettings::values.game_dirs);
+13
View File
@@ -690,6 +690,10 @@ KeyManager::KeyManager() {
}
void KeyManager::ReloadKeys() {
ticket_databases_loaded = false;
common_tickets.clear();
personal_tickets.clear();
// Initialize keys
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
@@ -1225,6 +1229,15 @@ void KeyManager::PopulateTickets() {
}
}
void KeyManager::ReloadTickets() {
ticket_databases_loaded = false;
common_tickets.clear();
personal_tickets.clear();
PopulateTickets();
SynthesizeTickets();
}
void KeyManager::SynthesizeTickets() {
for (const auto& key : s128_keys) {
if (key.first.type != S128KeyType::Titlekey) {
+1
View File
@@ -283,6 +283,7 @@ public:
void DeriveBase();
void DeriveETicket(PartitionDataManager& data, const FileSys::ContentProvider& provider);
void PopulateTickets();
void ReloadTickets();
void SynthesizeTickets();
void PopulateFromPartitionData(PartitionDataManager& data);
@@ -829,7 +829,7 @@ void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool ove
return;
}
Core::Crypto::KeyManager::Instance().PopulateTickets();
Core::Crypto::KeyManager::Instance().ReloadTickets();
using CitronPath = Common::FS::CitronPath;
const auto sdmc_dir_path = Common::FS::GetCitronPath(CitronPath::SDMCDir);
@@ -924,7 +924,7 @@ void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool ove
}
void FileSystemController::RefreshExternalContentProvider() {
Core::Crypto::KeyManager::Instance().PopulateTickets();
Core::Crypto::KeyManager::Instance().ReloadTickets();
auto vfs = system.GetFilesystem();
std::vector<FileSys::VirtualDir> load_dirs;