mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-27 18:41:10 +00:00
Fix NPDRM exitspawn
This commit is contained in:
parent
0e7e40f2cb
commit
af107df0b4
@ -3,6 +3,7 @@
|
|||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/IdManager.h"
|
#include "Emu/IdManager.h"
|
||||||
|
|
||||||
|
#include "Crypto/unedat.h"
|
||||||
#include "Emu/Cell/ErrorCodes.h"
|
#include "Emu/Cell/ErrorCodes.h"
|
||||||
#include "Emu/Cell/PPUThread.h"
|
#include "Emu/Cell/PPUThread.h"
|
||||||
#include "sys_lwmutex.h"
|
#include "sys_lwmutex.h"
|
||||||
@ -288,7 +289,7 @@ void _sys_process_exit2(ppu_thread& ppu, s32 status, vm::ptr<sys_exit2_param> ar
|
|||||||
|
|
||||||
vm::temporary_unlock(ppu);
|
vm::temporary_unlock(ppu);
|
||||||
|
|
||||||
Emu.CallAfter([path = std::move(path), argv = std::move(argv), envp = std::move(envp), data = std::move(data), disc = vfs::get("/dev_bdvd/")]() mutable
|
Emu.CallAfter([path = std::move(path), argv = std::move(argv), envp = std::move(envp), data = std::move(data), disc = vfs::get("/dev_bdvd/"), klic = fxm::get_always<LoadedNpdrmKeys_t>()->devKlic]() mutable
|
||||||
{
|
{
|
||||||
sys_process.success("Process finished -> %s", argv[0]);
|
sys_process.success("Process finished -> %s", argv[0]);
|
||||||
Emu.Stop();
|
Emu.Stop();
|
||||||
@ -296,6 +297,12 @@ void _sys_process_exit2(ppu_thread& ppu, s32 status, vm::ptr<sys_exit2_param> ar
|
|||||||
Emu.envp = std::move(envp);
|
Emu.envp = std::move(envp);
|
||||||
Emu.data = std::move(data);
|
Emu.data = std::move(data);
|
||||||
Emu.disc = std::move(disc);
|
Emu.disc = std::move(disc);
|
||||||
|
|
||||||
|
if (klic != std::array<u8, 16>{})
|
||||||
|
{
|
||||||
|
Emu.klic.assign(klic.begin(), klic.end());
|
||||||
|
}
|
||||||
|
|
||||||
Emu.BootGame(path, true);
|
Emu.BootGame(path, true);
|
||||||
|
|
||||||
if (Emu.IsReady() && !g_cfg.misc.autostart)
|
if (Emu.IsReady() && !g_cfg.misc.autostart)
|
||||||
|
@ -501,7 +501,7 @@ void Emulator::Load(bool add_only)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Decrypt SELF
|
// Decrypt SELF
|
||||||
elf_file = decrypt_self(std::move(elf_file));
|
elf_file = decrypt_self(std::move(elf_file), klic.empty() ? nullptr : klic.data());
|
||||||
|
|
||||||
if (fs::file elf_out{decrypted_path, fs::rewrite})
|
if (fs::file elf_out{decrypted_path, fs::rewrite})
|
||||||
{
|
{
|
||||||
@ -847,6 +847,7 @@ void Emulator::Stop()
|
|||||||
envp.clear();
|
envp.clear();
|
||||||
data.clear();
|
data.clear();
|
||||||
disc.clear();
|
disc.clear();
|
||||||
|
klic.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_info* sup2, u64 arg2)
|
s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_info* sup2, u64 arg2)
|
||||||
|
@ -215,6 +215,7 @@ public:
|
|||||||
std::vector<std::string> argv;
|
std::vector<std::string> argv;
|
||||||
std::vector<std::string> envp;
|
std::vector<std::string> envp;
|
||||||
std::vector<u8> data;
|
std::vector<u8> data;
|
||||||
|
std::vector<u8> klic;
|
||||||
std::string disc;
|
std::string disc;
|
||||||
|
|
||||||
const std::string& GetBoot() const
|
const std::string& GetBoot() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user