mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
cellGameGetParamString: fix patch mode
This commit is contained in:
parent
f92b487947
commit
1d6fbf1c35
1 changed files with 20 additions and 2 deletions
|
@ -175,6 +175,24 @@ struct content_permission final
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void fmt_class_string<content_permission::check_mode>::format(std::string& out, u64 arg)
|
||||||
|
{
|
||||||
|
format_enum(out, arg, [](auto error)
|
||||||
|
{
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
STR_CASE(content_permission::check_mode::not_set);
|
||||||
|
STR_CASE(content_permission::check_mode::game_data);
|
||||||
|
STR_CASE(content_permission::check_mode::patch);
|
||||||
|
STR_CASE(content_permission::check_mode::hdd_game);
|
||||||
|
STR_CASE(content_permission::check_mode::disc_game);
|
||||||
|
}
|
||||||
|
|
||||||
|
return unknown;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName, u32 errDialog, vm::ptr<CellHddGameStatCallback> funcStat, u32 container)
|
error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName, u32 errDialog, vm::ptr<CellHddGameStatCallback> funcStat, u32 container)
|
||||||
{
|
{
|
||||||
cellGame.warning("cellHddGameCheck(version=%d, dirName=%s, errDialog=%d, funcStat=*0x%x, container=%d)", version, dirName, errDialog, funcStat, container);
|
cellGame.warning("cellHddGameCheck(version=%d, dirName=%s, errDialog=%d, funcStat=*0x%x, container=%d)", version, dirName, errDialog, funcStat, container);
|
||||||
|
@ -1099,10 +1117,10 @@ public:
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case content_permission::check_mode::game_data:
|
case content_permission::check_mode::game_data:
|
||||||
|
case content_permission::check_mode::patch: // TODO: it's unclear if patch mode should also support these flags
|
||||||
{
|
{
|
||||||
return !!(flags & (is_setter ? strkey_flag::set_game_data : strkey_flag::get_game_data));
|
return !!(flags & (is_setter ? strkey_flag::set_game_data : strkey_flag::get_game_data));
|
||||||
}
|
}
|
||||||
case content_permission::check_mode::patch:
|
|
||||||
case content_permission::check_mode::hdd_game:
|
case content_permission::check_mode::hdd_game:
|
||||||
case content_permission::check_mode::disc_game:
|
case content_permission::check_mode::disc_game:
|
||||||
{
|
{
|
||||||
|
@ -1185,7 +1203,7 @@ error_code cellGameGetParamString(s32 id, vm::ptr<char> buf, u32 bufsize)
|
||||||
if (!key.is_supported(false, perm.mode))
|
if (!key.is_supported(false, perm.mode))
|
||||||
{
|
{
|
||||||
// TODO: this error is possibly only returned during debug mode
|
// TODO: this error is possibly only returned during debug mode
|
||||||
return CELL_GAME_ERROR_NOTSUPPORTED;
|
return { CELL_GAME_ERROR_NOTSUPPORTED, "id %d is not supported in the current check mode: %s", id, perm.mode.load() };
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto value = psf::get_string(perm.sfo, key.name);
|
const auto value = psf::get_string(perm.sfo, key.name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue