Separate Updates from Game Folder (#1026)

* separate updates implementation

* clang format

clang format

clang format

clang format

clang hates me

work please

* hotfix: check for sfo file instead of the folder

* tiny change

* refactor

* forgot to change this over

* add review changes

* use operator
This commit is contained in:
ElBread3 2024-10-15 10:49:42 -05:00 committed by GitHub
parent 29ad2eca62
commit a588bc5da8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 135 additions and 12 deletions

View file

@ -25,9 +25,15 @@ public:
static GameInfo readGameInfo(const std::filesystem::path& filePath) {
GameInfo game;
game.path = filePath;
std::filesystem::path sce_folder_path = filePath / "sce_sys" / "param.sfo";
std::filesystem::path game_update_path =
std::filesystem::path(filePath.string() + "-UPDATE");
if (std::filesystem::exists(game_update_path / "sce_sys" / "param.sfo")) {
sce_folder_path = game_update_path / "sce_sys" / "param.sfo";
}
PSF psf;
if (psf.Open(game.path / "sce_sys" / "param.sfo")) {
if (psf.Open(sce_folder_path)) {
game.icon_path = game.path / "sce_sys" / "icon0.png";
QString iconpath;
Common::FS::PathToQString(iconpath, game.icon_path);