diff --git a/rpcs3/Emu/Cell/Modules/sys_spu_.cpp b/rpcs3/Emu/Cell/Modules/sys_spu_.cpp index fa6a538db1..2a725de993 100644 --- a/rpcs3/Emu/Cell/Modules/sys_spu_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_spu_.cpp @@ -383,7 +383,7 @@ s32 sys_raw_spu_load(s32 id, vm::cptr path, vm::ptr entry) { sysPrxForUser.warning("sys_raw_spu_load(id=%d, path=%s, entry=*0x%x)", id, path, entry); - const fs::file elf_file = decrypt_self(fs::file(vfs::get(path.get_ptr()))); + const fs::file elf_file = fs::file(vfs::get(path.get_ptr())); if (!elf_file) { diff --git a/rpcs3/Emu/Cell/lv2/sys_prx.cpp b/rpcs3/Emu/Cell/lv2/sys_prx.cpp index 4b2988d630..e50ac94403 100644 --- a/rpcs3/Emu/Cell/lv2/sys_prx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_prx.cpp @@ -121,9 +121,7 @@ error_code prx_load_module(std::string path, u64 flags, vm::ptr(); - - const ppu_prx_object obj = decrypt_self(fs::file(vfs::get(path)), loadedkeys->devKlic.data()); + const ppu_prx_object obj = decrypt_self(fs::file(vfs::get(path)), fxm::get_always()->devKlic.data()); if (obj != elf_error::ok) { diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index 813147307d..379b839f6e 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -3,6 +3,7 @@ #include "Emu/System.h" #include "Emu/IdManager.h" #include "Crypto/unself.h" +#include "Crypto/unedat.h" #include "Crypto/sha1.h" #include "Loader/ELF.h" #include "Utilities/bin_patch.h" @@ -163,11 +164,11 @@ error_code sys_spu_image_open(vm::ptr img, vm::cptr path) { sys_spu.warning("sys_spu_image_open(img=*0x%x, path=%s)", img, path); - const fs::file elf_file = decrypt_self(fs::file(vfs::get(path.get_ptr()))); + const fs::file elf_file = decrypt_self(fs::file(vfs::get(path.get_ptr())), fxm::get_always()->devKlic.data()); if (!elf_file) { - sys_spu.error("sys_spu_image_open() error: %s not found!", path); + sys_spu.error("sys_spu_image_open() error: failed to open %s!", path); return CELL_ENOENT; }