mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Fix cellDiscGameGetBootDiscInfo on error
* Always set first dword to 0, other bytes are untouched,
This commit is contained in:
parent
4d7e53d7a0
commit
0ba1f8f4ef
@ -1045,16 +1045,18 @@ error_code cellDiscGameGetBootDiscInfo(vm::ptr<CellDiscGameSystemFileParam> getP
|
||||
cellGame.warning("cellDiscGameGetBootDiscInfo(getParam=*0x%x)", getParam);
|
||||
|
||||
if (!getParam)
|
||||
{
|
||||
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
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user