mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-12 09:40:53 +00:00
Fix decrypt_self usage
This commit is contained in:
parent
174f11bdbd
commit
5b00aaf561
@ -383,7 +383,7 @@ s32 sys_raw_spu_load(s32 id, vm::cptr<char> path, vm::ptr<u32> 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)
|
||||
{
|
||||
|
@ -121,9 +121,7 @@ error_code prx_load_module(std::string path, u64 flags, vm::ptr<sys_prx_load_mod
|
||||
return not_an_error(idm::last_id());
|
||||
}
|
||||
|
||||
const auto loadedkeys = fxm::get_always<LoadedNpdrmKeys_t>();
|
||||
|
||||
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<LoadedNpdrmKeys_t>()->devKlic.data());
|
||||
|
||||
if (obj != elf_error::ok)
|
||||
{
|
||||
|
@ -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<sys_spu_image> img, vm::cptr<char> 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<LoadedNpdrmKeys_t>()->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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user