psp bugfixes, refactoring, stuff
[libpicofe.git] / gp2x / emu.c
index 8bd1b66..41187c5 100644 (file)
@@ -105,7 +105,7 @@ static void find_combos(void)
        for (act = 0; act < 32; act++)\r
        {\r
                int keyc = 0;\r
-               if (act == 16) continue; // player2 flag\r
+               if (act == 16 || act == 17) continue; // player2 flag\r
                for (u = 0; u < 32; u++)\r
                {\r
                        if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;\r
@@ -629,7 +629,7 @@ static void simpleWait(int thissec, int lim_time)
 void emu_Loop(void)\r
 {\r
        static int gp2x_old_clock = 200;\r
-       static int PsndRate_old = 0, PicoOpt_old = 0, EmuOpt_old = 0, PsndLen_real = 0, pal_old = 0;\r
+       static int PsndRate_old = 0, PicoOpt_old = 0, EmuOpt_old = 0, pal_old = 0;\r
        char fpsbuff[24]; // fps count c string\r
        struct timeval tval; // timing\r
        int thissec = 0, frames_done = 0, frames_shown = 0, oldmodes = 0;\r
@@ -682,7 +682,7 @@ void emu_Loop(void)
                                Reset940(1, 2);\r
                                Pause940(1);\r
                        }\r
-                       sound_rerate(Pico.m.frame_count ? 1 : 0);\r
+                       PsndRerate(Pico.m.frame_count ? 1 : 0);\r
                }\r
                snd_excess_add = ((PsndRate - PsndLen*target_fps)<<16) / target_fps;\r
                printf("starting audio: %i len: %i (ex: %04x) stereo: %i, pal: %i\n",\r
@@ -693,7 +693,6 @@ void emu_Loop(void)
                memset(sndBuffer, 0, sizeof(sndBuffer));\r
                PsndOut = sndBuffer;\r
                PsndRate_old = PsndRate;\r
-               PsndLen_real = PsndLen;\r
                PicoOpt_old  = PicoOpt;\r
                pal_old = Pico.m.pal;\r
        } else {\r