diff options
| author | 2023-08-24 01:16:19 +0200 | |
|---|---|---|
| committer | 2023-08-24 01:16:19 +0200 | |
| commit | e41655960effba3b41879d01be36cc550f4860c1 (patch) | |
| tree | 4581338a72d72daf3773e701b99fc398476feba9 | |
| parent | Merge pull request #11352 from t895/recurse-subfolders (diff) | |
| download | yuzu-e41655960effba3b41879d01be36cc550f4860c1.tar.gz yuzu-e41655960effba3b41879d01be36cc550f4860c1.tar.xz yuzu-e41655960effba3b41879d01be36cc550f4860c1.zip | |
game_list_worker: Display correct size for NAX games
This was a regression from https://github.com/yuzu-emu/yuzu/pull/1837.
Fixes https://github.com/yuzu-emu/yuzu/issues/1938.
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/game_list_worker.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index 9404365b4..e7fb8a282 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp | |||
| @@ -191,8 +191,9 @@ QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager, | |||
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::string& name, | 193 | QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::string& name, |
| 194 | const std::vector<u8>& icon, Loader::AppLoader& loader, | 194 | const std::size_t size, const std::vector<u8>& icon, |
| 195 | u64 program_id, const CompatibilityList& compatibility_list, | 195 | Loader::AppLoader& loader, u64 program_id, |
| 196 | const CompatibilityList& compatibility_list, | ||
| 196 | const FileSys::PatchManager& patch) { | 197 | const FileSys::PatchManager& patch) { |
| 197 | const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id); | 198 | const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id); |
| 198 | 199 | ||
| @@ -210,7 +211,7 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::stri | |||
| 210 | file_type_string, program_id), | 211 | file_type_string, program_id), |
| 211 | new GameListItemCompat(compatibility), | 212 | new GameListItemCompat(compatibility), |
| 212 | new GameListItem(file_type_string), | 213 | new GameListItem(file_type_string), |
| 213 | new GameListItemSize(Common::FS::GetSize(path)), | 214 | new GameListItemSize(size), |
| 214 | }; | 215 | }; |
| 215 | 216 | ||
| 216 | const auto patch_versions = GetGameListCachedObject( | 217 | const auto patch_versions = GetGameListCachedObject( |
| @@ -278,8 +279,8 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) { | |||
| 278 | GetMetadataFromControlNCA(patch, *control, icon, name); | 279 | GetMetadataFromControlNCA(patch, *control, icon, name); |
| 279 | } | 280 | } |
| 280 | 281 | ||
| 281 | emit EntryReady(MakeGameListEntry(file->GetFullPath(), name, icon, *loader, program_id, | 282 | emit EntryReady(MakeGameListEntry(file->GetFullPath(), name, file->GetSize(), icon, *loader, |
| 282 | compatibility_list, patch), | 283 | program_id, compatibility_list, patch), |
| 283 | parent_dir); | 284 | parent_dir); |
| 284 | } | 285 | } |
| 285 | } | 286 | } |
| @@ -354,8 +355,9 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa | |||
| 354 | const FileSys::PatchManager patch{id, system.GetFileSystemController(), | 355 | const FileSys::PatchManager patch{id, system.GetFileSystemController(), |
| 355 | system.GetContentProvider()}; | 356 | system.GetContentProvider()}; |
| 356 | 357 | ||
| 357 | emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader, id, | 358 | emit EntryReady(MakeGameListEntry(physical_name, name, |
| 358 | compatibility_list, patch), | 359 | Common::FS::GetSize(physical_name), icon, |
| 360 | *loader, id, compatibility_list, patch), | ||
| 359 | parent_dir); | 361 | parent_dir); |
| 360 | } | 362 | } |
| 361 | } else { | 363 | } else { |
| @@ -368,9 +370,10 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa | |||
| 368 | const FileSys::PatchManager patch{program_id, system.GetFileSystemController(), | 370 | const FileSys::PatchManager patch{program_id, system.GetFileSystemController(), |
| 369 | system.GetContentProvider()}; | 371 | system.GetContentProvider()}; |
| 370 | 372 | ||
| 371 | emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader, | 373 | emit EntryReady( |
| 372 | program_id, compatibility_list, patch), | 374 | MakeGameListEntry(physical_name, name, Common::FS::GetSize(physical_name), |
| 373 | parent_dir); | 375 | icon, *loader, program_id, compatibility_list, patch), |
| 376 | parent_dir); | ||
| 374 | } | 377 | } |
| 375 | } | 378 | } |
| 376 | } else if (is_dir) { | 379 | } else if (is_dir) { |