| 1816 | } |
| 1817 | |
| 1818 | error_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 | |
| 1855 | error_code cellGameGetSizeKB(ppu_thread& ppu, vm::ptr<s32> size) |
| 1856 | { |
nothing calls this directly
no test coverage detected