interpreter: simplify icache implementation
[pcsx_rearmed.git] / frontend / libretro.c
index 37cccc4..4c285cf 100644 (file)
 #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"
@@ -1059,6 +1063,7 @@ static void update_variables(bool in_flight)
       }
    }
 #endif
+   psxCpu->ApplyConfig();
 
    var.value = "NULL";
    var.key = "pcsx_rearmed_spu_reverb";
@@ -1202,6 +1207,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
+
        ret = emu_core_preinit();
        ret |= emu_core_init();
        if (ret != 0) {