From 8f3ad8b81a2fd8359d9f7695f1430a5d698d5ea3 Mon Sep 17 00:00:00 2001 From: Eladash Date: Tue, 7 Apr 2020 14:03:03 +0300 Subject: [PATCH] Fix cellGameDataCheckCreate2 error broken check (#7976) --- rpcs3/Emu/Cell/Modules/cellGame.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index f3b0944408..9d59ce42bc 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -565,9 +565,13 @@ error_code cellGameDataCheckCreate2(ppu_thread& ppu, u32 version, vm::cptr const u32 new_data = sfo.empty() && !fs::is_file(vfs::get(dir + "/PARAM.SFO")) ? CELL_GAMEDATA_ISNEWDATA_YES : CELL_GAMEDATA_ISNEWDATA_NO; - if (!new_data && psf::get_string(sfo, "CATEGORY", "") != "GD") + if (!new_data) { - return CELL_GAMEDATA_ERROR_BROKEN; + const auto cat = psf::get_string(sfo, "CATEGORY", ""); + if (cat != "GD" && cat != "DG") + { + return CELL_GAMEDATA_ERROR_BROKEN; + } } cbGet->isNewData = new_data; @@ -628,7 +632,11 @@ error_code cellGameDataCheckCreate2(ppu_thread& ppu, u32 version, vm::cptr if (setParam) { - psf::assign(sfo, "CATEGORY", psf::string(3, "GD")); + if (new_data) + { + psf::assign(sfo, "CATEGORY", psf::string(3, "GD")); + } + psf::assign(sfo, "TITLE_ID", psf::string(CELL_GAME_SYSP_TITLEID_SIZE, setParam->titleId)); psf::assign(sfo, "TITLE", psf::string(CELL_GAME_SYSP_TITLE_SIZE, setParam->title)); psf::assign(sfo, "VERSION", psf::string(CELL_GAME_SYSP_VERSION_SIZE, setParam->dataVersion));