cellGame: report not found sfo params
This commit is contained in:
@@ -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);
|
*value = psf::get_integer(prm->sfo, key, 0);
|
||||||
return CELL_OK;
|
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 std::string value = psf::get_string(prm->sfo, std::string(key.name));
|
||||||
const auto value_size = value.size() + 1;
|
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 auto pbuf = buf.get_ptr();
|
||||||
const bool to_pad = bufsize > value_size;
|
const bool to_pad = bufsize > value_size;
|
||||||
std::memcpy(pbuf, value.c_str(), to_pad ? value_size : bufsize);
|
std::memcpy(pbuf, value.c_str(), to_pad ? value_size : bufsize);
|
||||||
|
|||||||
Reference in New Issue
Block a user