#include "../../frontend/libretro-rthreads.h"
#include "features/features_cpu.h"
#include "retro_timers.h"
+#ifdef VITA
+#include <psp2/kernel/sysmem.h>
+#endif
#endif
#ifdef _3DS
#include <3ds_utils.h>
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)
{
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);