mirror of
https://git.uzuy-edge.org/Uzuy-X/Uzuy.git
synced 2024-11-24 03:29:44 +00:00
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.
This commit is contained in:
parent
ccd163ab2c
commit
e41655960e
@ -191,8 +191,9 @@ QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::string& name,
|
QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::string& name,
|
||||||
const std::vector<u8>& icon, Loader::AppLoader& loader,
|
const std::size_t size, const std::vector<u8>& icon,
|
||||||
u64 program_id, const CompatibilityList& compatibility_list,
|
Loader::AppLoader& loader, u64 program_id,
|
||||||
|
const CompatibilityList& compatibility_list,
|
||||||
const FileSys::PatchManager& patch) {
|
const FileSys::PatchManager& patch) {
|
||||||
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id);
|
||||||
|
|
||||||
@ -210,7 +211,7 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::stri
|
|||||||
file_type_string, program_id),
|
file_type_string, program_id),
|
||||||
new GameListItemCompat(compatibility),
|
new GameListItemCompat(compatibility),
|
||||||
new GameListItem(file_type_string),
|
new GameListItem(file_type_string),
|
||||||
new GameListItemSize(Common::FS::GetSize(path)),
|
new GameListItemSize(size),
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto patch_versions = GetGameListCachedObject(
|
const auto patch_versions = GetGameListCachedObject(
|
||||||
@ -278,8 +279,8 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) {
|
|||||||
GetMetadataFromControlNCA(patch, *control, icon, name);
|
GetMetadataFromControlNCA(patch, *control, icon, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit EntryReady(MakeGameListEntry(file->GetFullPath(), name, icon, *loader, program_id,
|
emit EntryReady(MakeGameListEntry(file->GetFullPath(), name, file->GetSize(), icon, *loader,
|
||||||
compatibility_list, patch),
|
program_id, compatibility_list, patch),
|
||||||
parent_dir);
|
parent_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -354,8 +355,9 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
|||||||
const FileSys::PatchManager patch{id, system.GetFileSystemController(),
|
const FileSys::PatchManager patch{id, system.GetFileSystemController(),
|
||||||
system.GetContentProvider()};
|
system.GetContentProvider()};
|
||||||
|
|
||||||
emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader, id,
|
emit EntryReady(MakeGameListEntry(physical_name, name,
|
||||||
compatibility_list, patch),
|
Common::FS::GetSize(physical_name), icon,
|
||||||
|
*loader, id, compatibility_list, patch),
|
||||||
parent_dir);
|
parent_dir);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -368,9 +370,10 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
|
|||||||
const FileSys::PatchManager patch{program_id, system.GetFileSystemController(),
|
const FileSys::PatchManager patch{program_id, system.GetFileSystemController(),
|
||||||
system.GetContentProvider()};
|
system.GetContentProvider()};
|
||||||
|
|
||||||
emit EntryReady(MakeGameListEntry(physical_name, name, icon, *loader,
|
emit EntryReady(
|
||||||
program_id, compatibility_list, patch),
|
MakeGameListEntry(physical_name, name, Common::FS::GetSize(physical_name),
|
||||||
parent_dir);
|
icon, *loader, program_id, compatibility_list, patch),
|
||||||
|
parent_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (is_dir) {
|
} else if (is_dir) {
|
||||||
|
Loading…
Reference in New Issue
Block a user