mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
cellGame: report not found sfo params
This commit is contained in:
parent
cb52ee0a4d
commit
e9e8f0c5b7
1 changed files with 12 additions and 0 deletions
|
@ -758,6 +758,12 @@ error_code cellGameGetParamInt(s32 id, vm::ptr<s32> value)
|
|||
}
|
||||
}
|
||||
|
||||
if (!prm->sfo.count(key))
|
||||
{
|
||||
// TODO: Check if special values need to be set here
|
||||
cellGame.warning("cellGameGetParamInt(): id=%d was not found", id);
|
||||
}
|
||||
|
||||
*value = psf::get_integer(prm->sfo, key, 0);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -847,6 +853,12 @@ error_code cellGameGetParamString(s32 id, vm::ptr<char> buf, u32 bufsize)
|
|||
const std::string value = psf::get_string(prm->sfo, std::string(key.name));
|
||||
const auto value_size = value.size() + 1;
|
||||
|
||||
if (value.empty() && !prm->sfo.count(std::string(key.name)))
|
||||
{
|
||||
// TODO: Check if special values need to be set here
|
||||
cellGame.warning("cellGameGetParamString(): id=%d was not found", id);
|
||||
}
|
||||
|
||||
const auto pbuf = buf.get_ptr();
|
||||
const bool to_pad = bufsize > value_size;
|
||||
std::memcpy(pbuf, value.c_str(), to_pad ? value_size : bufsize);
|
||||
|
|
Loading…
Add table
Reference in a new issue