From c93fb19e8fa757c4eab44f373b697c8158d90c42 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 1 Nov 2007 23:07:56 +0000 Subject: [PATCH] bugfix/improvement git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@290 be3aeb3a-fb24-0410-a615-afba39da0efa --- gp2x/emu.c | 18 +++++++++++++++--- psp/emu.c | 19 ++++++++++++++++--- psp/menu.c | 4 ++-- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/gp2x/emu.c b/gp2x/emu.c index 41187c5..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); } diff --git a/psp/emu.c b/psp/emu.c index 3f645ed..e72ea7d 100644 --- a/psp/emu.c +++ b/psp/emu.c @@ -794,11 +794,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) { @@ -867,6 +878,8 @@ void emu_Loop(void) sound_prepare(); } + sceDisplayWaitVblankStart(); + // loop? while (engineState == PGS_Running) { diff --git a/psp/menu.c b/psp/menu.c index 2231d95..cdcf1e6 100644 --- a/psp/menu.c +++ b/psp/menu.c @@ -991,7 +991,7 @@ static void menu_opt3_cust_draw(const menu_entry *entry, int x, int y, void *par char *val = " never"; if (currentConfig.EmuOpt & 0x2000) val = (currentConfig.EmuOpt & 0x10000) ? "sometimes" : " always"; - text_out16(x, y, "Wait for vsync %s", val); + text_out16(x, y, "Wait for vsync (slow) %s", val); break; } default: break; @@ -1045,7 +1045,7 @@ static void draw_dispmenu_options(int menu_sel) static void dispmenu_loop_options(void) { static int menu_sel = 0; - int menu_sel_max, is_32col = 0; + int menu_sel_max, is_32col = (Pico.video.reg[12]&1)^1; unsigned long inp = 0; menu_id selected_id; -- 2.39.2