aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/libretro.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c
index 444719a..1e86509 100644
--- a/frontend/libretro.c
+++ b/frontend/libretro.c
@@ -10,6 +10,10 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
+#ifdef __MACH__
+#include <unistd.h>
+#include <sys/syscall.h>
+#endif
#include "../libpcsxcore/misc.h"
#include "../libpcsxcore/psxcounters.h"
@@ -1550,6 +1554,11 @@ void retro_init(void)
int i, ret;
bool found_bios = false;
+#ifdef __MACH__
+ // magic sauce to make the dynarec work on iOS
+ syscall(SYS_ptrace, 0 /*PTRACE_TRACEME*/, 0, 0, 0);
+#endif
+
#ifdef _3DS
psxMapHook = pl_3ds_mmap;
psxUnmapHook = pl_3ds_munmap;