PPU: Precompile only encrypted executeables

Improve sys_prx_load_module and sys_overlay_load_module error checking.
This commit is contained in:
Eladash 2023-09-02 20:07:35 +03:00 committed by Elad Ashkenazi
parent d62d6cc852
commit b900c43ceb
5 changed files with 18 additions and 7 deletions

View file

@ -263,11 +263,11 @@ static error_code prx_load_module(const std::string& vpath, u64 flags, vm::ptr<s
u128 klic = g_fxo->get<loaded_npdrm_keys>().last_key();
ppu_prx_object obj = decrypt_self(std::move(src), reinterpret_cast<u8*>(&klic));
ppu_prx_object obj = decrypt_self(std::move(src), reinterpret_cast<u8*>(&klic), nullptr, true);
if (obj != elf_error::ok)
{
return CELL_PRX_ERROR_ILLEGAL_LIBRARY;
return CELL_PRX_ERROR_UNSUPPORTED_PRX_TYPE;
}
const auto prx = ppu_load_prx(obj, false, path, file_offset);