psxbios: experimental vsync HLE
[pcsx_rearmed.git] / frontend / main.c
index e0635ef..e234990 100644 (file)
@@ -23,6 +23,7 @@
 #include "plat.h"
 #include "../libpcsxcore/misc.h"
 #include "../libpcsxcore/cheat.h"
+#include "../libpcsxcore/sio.h"
 #include "../libpcsxcore/new_dynarec/new_dynarec.h"
 #include "../plugins/cdrcimg/cdrcimg.h"
 #include "../plugins/dfsound/spu_config.h"
@@ -487,7 +488,7 @@ int emu_core_init(void)
 
 void emu_core_ask_exit(void)
 {
-       stop = 1;
+       stop++;
        g_emu_want_quit = 1;
 }
 
@@ -703,8 +704,8 @@ static void toggle_fast_forward(int force_off)
 {
        static int fast_forward;
        static int normal_g_opts;
-       static int normal_frameskip;
        static int normal_enhancement_enable;
+       //static int normal_frameskip;
 
        if (force_off && !fast_forward)
                return;
@@ -712,16 +713,16 @@ static void toggle_fast_forward(int force_off)
        fast_forward = !fast_forward;
        if (fast_forward) {
                normal_g_opts = g_opts;
-               normal_frameskip = pl_rearmed_cbs.frameskip;
+               //normal_frameskip = pl_rearmed_cbs.frameskip;
                normal_enhancement_enable =
                        pl_rearmed_cbs.gpu_neon.enhancement_enable;
 
                g_opts |= OPT_NO_FRAMELIM;
-               pl_rearmed_cbs.frameskip = 3;
+               // pl_rearmed_cbs.frameskip = 3; // too broken
                pl_rearmed_cbs.gpu_neon.enhancement_enable = 0;
        } else {
                g_opts = normal_g_opts;
-               pl_rearmed_cbs.frameskip = normal_frameskip;
+               //pl_rearmed_cbs.frameskip = normal_frameskip;
                pl_rearmed_cbs.gpu_neon.enhancement_enable =
                        normal_enhancement_enable;
 
@@ -736,7 +737,7 @@ static void toggle_fast_forward(int force_off)
 static void SignalExit(int sig) {
        // only to restore framebuffer/resolution on some devices
        plat_finish();
-       exit(1);
+       _exit(1);
 }
 #endif
 
@@ -780,9 +781,6 @@ void SysClose() {
        }
 }
 
-void SysUpdate() {
-}
-
 int get_state_filename(char *buf, int size, int i) {
        return get_gameid_filename(buf, size,
                "." STATES_DIR "%.32s-%.9s.%3.3d", i);
@@ -889,8 +887,6 @@ static int _OpenPlugins(void) {
        signal(SIGPIPE, SignalExit);
 #endif
 
-       GPU_clearDynarec(clearDynarec);
-
        ret = CDR_open();
        if (ret < 0) { SysMessage(_("Error opening CD-ROM plugin!")); return -1; }
        ret = SPU_open();