MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / cellGameSetParamString

Function cellGameSetParamString

ps3fw/cellGame.cpp:1818–1853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1816}
1817
1818error_code cellGameSetParamString(s32 id, vm::cptr<char> buf)
1819{
1820 cellGame.warning("cellGameSetParamString(id=%d, buf=*0x%x %s)", id, buf, buf);
1821
1822 if (!buf)
1823 {
1824 return CELL_GAME_ERROR_PARAM;
1825 }
1826
1827 lv2_sleep(2000);
1828
1829 auto& perm = g_fxo->get<content_permission>();
1830
1831 const auto init = acquire_access_lock(perm.init);
1832
1833 if (!init || perm.mode == content_permission::check_mode::not_set)
1834 {
1835 return CELL_GAME_ERROR_FAILURE;
1836 }
1837
1838 const auto key = get_param_string_key(id);
1839
1840 if (key.name.empty())
1841 {
1842 return CELL_GAME_ERROR_INVALID_ID;
1843 }
1844
1845 if (!perm.can_create || !key.is_supported(true, perm.mode))
1846 {
1847 return CELL_GAME_ERROR_NOTSUPPORTED;
1848 }
1849
1850 psf::assign(perm.sfo, key.name, psf::string(key.max_size, buf.get_ptr()));
1851
1852 return CELL_OK;
1853}
1854
1855error_code cellGameGetSizeKB(ppu_thread& ppu, vm::ptr<s32> size)
1856{

Callers

nothing calls this directly

Calls 8

lv2_sleepFunction · 0.85
acquire_access_lockFunction · 0.85
get_param_string_keyFunction · 0.85
assignFunction · 0.85
stringFunction · 0.50
emptyMethod · 0.45
is_supportedMethod · 0.45
get_ptrMethod · 0.45

Tested by

no test coverage detected