mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Fix cellDiscGameGetBootDiscInfo on error
* Always set first dword to 0, other bytes are untouched,
This commit is contained in:
parent
4d7e53d7a0
commit
0ba1f8f4ef
1 changed files with 6 additions and 4 deletions
|
@ -1045,16 +1045,18 @@ error_code cellDiscGameGetBootDiscInfo(vm::ptr<CellDiscGameSystemFileParam> getP
|
||||||
cellGame.warning("cellDiscGameGetBootDiscInfo(getParam=*0x%x)", getParam);
|
cellGame.warning("cellDiscGameGetBootDiscInfo(getParam=*0x%x)", getParam);
|
||||||
|
|
||||||
if (!getParam)
|
if (!getParam)
|
||||||
|
{
|
||||||
return CELL_DISCGAME_ERROR_PARAM;
|
return CELL_DISCGAME_ERROR_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always sets 0 at first dword
|
||||||
|
reinterpret_cast<nse_t<u32, 1>*>(getParam->titleId)[0] = 0;
|
||||||
|
|
||||||
// This is also called by non-disc games, see NPUB90029
|
// 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)))
|
if (!fs::is_dir(vfs::get(dir)))
|
||||||
{
|
{
|
||||||
getParam->parentalLevel = 0;
|
|
||||||
strcpy_trunc(getParam->titleId, "0");
|
|
||||||
|
|
||||||
return CELL_DISCGAME_ERROR_NOT_DISCBOOT;
|
return CELL_DISCGAME_ERROR_NOT_DISCBOOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue