mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-14 10:54:57 +00:00
game_list: Use RegisteredCacheUnion for installed
Reduces code
This commit is contained in:
parent
99fbcb3bf2
commit
d2caf4af7d
3 changed files with 3 additions and 5 deletions
|
@ -21,7 +21,7 @@ size_t CTREncryptionLayer::Read(u8* data, size_t length, size_t offset) const {
|
||||||
UpdateIV(base_offset + offset);
|
UpdateIV(base_offset + offset);
|
||||||
std::vector<u8> raw = base->ReadBytes(length, offset);
|
std::vector<u8> raw = base->ReadBytes(length, offset);
|
||||||
cipher.Transcode(raw.data(), raw.size(), data, Op::Decrypt);
|
cipher.Transcode(raw.data(), raw.size(), data, Op::Decrypt);
|
||||||
return raw.size();
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
// offset does not fall on block boundary (0x10)
|
// offset does not fall on block boundary (0x10)
|
||||||
|
|
|
@ -621,9 +621,7 @@ void GameListWorker::run() {
|
||||||
stop_processing = false;
|
stop_processing = false;
|
||||||
watch_list.append(dir_path);
|
watch_list.append(dir_path);
|
||||||
FillControlMap(dir_path.toStdString());
|
FillControlMap(dir_path.toStdString());
|
||||||
AddInstalledTitlesToGameList(Service::FileSystem::GetUserNANDContents());
|
AddInstalledTitlesToGameList();
|
||||||
AddInstalledTitlesToGameList(Service::FileSystem::GetSystemNANDContents());
|
|
||||||
AddInstalledTitlesToGameList(Service::FileSystem::GetSDMCContents());
|
|
||||||
AddFstEntriesToGameList(dir_path.toStdString(), deep_scan ? 256 : 0);
|
AddFstEntriesToGameList(dir_path.toStdString(), deep_scan ? 256 : 0);
|
||||||
nca_control_map.clear();
|
nca_control_map.clear();
|
||||||
emit Finished(watch_list);
|
emit Finished(watch_list);
|
||||||
|
|
|
@ -239,7 +239,7 @@ private:
|
||||||
const std::unordered_map<std::string, std::pair<QString, QString>>& compatibility_list;
|
const std::unordered_map<std::string, std::pair<QString, QString>>& compatibility_list;
|
||||||
std::atomic_bool stop_processing;
|
std::atomic_bool stop_processing;
|
||||||
|
|
||||||
void AddInstalledTitlesToGameList(std::shared_ptr<FileSys::RegisteredCache> cache);
|
void AddInstalledTitlesToGameList();
|
||||||
void FillControlMap(const std::string& dir_path);
|
void FillControlMap(const std::string& dir_path);
|
||||||
void AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion = 0);
|
void AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion = 0);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue