From: notaz Date: Wed, 18 Dec 2024 21:47:00 +0000 (+0200) Subject: vita: another try X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86a5ff1b364c126cca74d23de6eebdb99e3418f6;p=pcsx_rearmed.git vita: another try maybe the last libretro/pcsx_rearmed#856 --- diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index a9122c81..5042bf58 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -24,6 +24,9 @@ #include "../../frontend/libretro-rthreads.h" #include "features/features_cpu.h" #include "retro_timers.h" +#ifdef VITA +#include +#endif #endif #ifdef _3DS #include <3ds_utils.h> @@ -446,6 +449,10 @@ static void ari64_compile_thread(void *unused) void *target; u32 addr; +#ifdef VITA + int ret = sceKernelOpenVMDomain(); + if (ret) SysPrintf("thread: sceKernelOpenVMDomain: %x\n", ret); +#endif slock_lock(ndrc_g.thread.lock); while (!ndrc_g.thread.exit) { diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 10315b53..cc72e7a8 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -6334,9 +6334,11 @@ void new_dynarec_init(void) if (sceBlock <= 0) SysPrintf("getVMBlock failed: %x\n", sceBlock); int ret = sceKernelGetMemBlockBase(sceBlock, (void **)&ndrc); - if (ret < 0) - SysPrintf("sceKernelGetMemBlockBase failed: %x\n", ret); - sceKernelOpenVMDomain(); + if (ret) + SysPrintf("sceKernelGetMemBlockBase: %x\n", ret); + ret = sceKernelOpenVMDomain(); + if (ret) + SysPrintf("sceKernelOpenVMDomain: %x\n", ret); #elif defined(_MSC_VER) ndrc = VirtualAlloc(NULL, sizeof(*ndrc), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);