X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=gp2x%2Femu.c;h=701bcd81ebaf9b2b9df8c53e0ea1245139b960c6;hb=5ecedd0cc2257b564dfcf68cb0e9d7d541bfc2b8;hp=954d26f5dfe696f19f04679a83adea0bda440ae6;hpb=65345ecc322ac70dcd7321859fc3e7601c030b6d;p=libpicofe.git diff --git a/gp2x/emu.c b/gp2x/emu.c index 954d26f..701bcd8 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -104,11 +104,22 @@ static void find_combos(void) combo_keys = combo_acts = 0; for (act = 0; act < 32; act++) { - int keyc = 0; + int keyc = 0, keyc2 = 0; if (act == 16 || act == 17) continue; // player2 flag - for (u = 0; u < 32; u++) + if (act > 17) { - if (currentConfig.KeyBinds[u] & (1 << act)) keyc++; + for (u = 0; u < 32; u++) + if (currentConfig.KeyBinds[u] & (1 << act)) keyc++; + } + else + { + for (u = 0; u < 32; u++) + if ((currentConfig.KeyBinds[u] & 0x30000) == 0 && // pl. 1 + (currentConfig.KeyBinds[u] & (1 << act))) keyc++; + for (u = 0; u < 32; u++) + if ((currentConfig.KeyBinds[u] & 0x30000) == 1 && // pl. 2 + (currentConfig.KeyBinds[u] & (1 << act))) keyc2++; + if (keyc2 > keyc) keyc = keyc2; } if (keyc > 1) { @@ -122,6 +133,7 @@ static void find_combos(void) } } } + // printf("combo keys/acts: %08x %08x\n", combo_keys, combo_acts); } @@ -682,7 +694,7 @@ void emu_Loop(void) Reset940(1, 2); Pause940(1); } - sound_rerate(Pico.m.frame_count ? 1 : 0); + PsndRerate(Pico.m.frame_count ? 1 : 0); } snd_excess_add = ((PsndRate - PsndLen*target_fps)<<16) / target_fps; printf("starting audio: %i len: %i (ex: %04x) stereo: %i, pal: %i\n",