From 0ba1f8f4ef72990b5da3af3202dc596bc90ab87b Mon Sep 17 00:00:00 2001 From: Eladash Date: Fri, 21 Feb 2020 00:11:53 +0200 Subject: [PATCH] Fix cellDiscGameGetBootDiscInfo on error * Always set first dword to 0, other bytes are untouched, --- rpcs3/Emu/Cell/Modules/cellGame.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 9c9e46e62f..fd46726c3b 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -1045,16 +1045,18 @@ error_code cellDiscGameGetBootDiscInfo(vm::ptr getP cellGame.warning("cellDiscGameGetBootDiscInfo(getParam=*0x%x)", getParam); if (!getParam) + { return CELL_DISCGAME_ERROR_PARAM; + } + + // Always sets 0 at first dword + reinterpret_cast*>(getParam->titleId)[0] = 0; // This is also called by non-disc games, see NPUB90029 - const std::string dir = "/dev_bdvd/PS3_GAME"s; + static const std::string dir = "/dev_bdvd/PS3_GAME"s; if (!fs::is_dir(vfs::get(dir))) { - getParam->parentalLevel = 0; - strcpy_trunc(getParam->titleId, "0"); - return CELL_DISCGAME_ERROR_NOT_DISCBOOT; }