From ca5c359d908ce4d89239f3250a7c227d062b32e0 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 5 Jun 2007 20:56:42 +0000 Subject: [PATCH] usbjoy fix git-svn-id: file:///home/notaz/opt/svn/fceu@155 be3aeb3a-fb24-0410-a615-afba39da0efa --- drivers/gp2x/menu.c | 13 ++++++------- out_gp2x/readme.txt | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gp2x/menu.c b/drivers/gp2x/menu.c index 5cedc85..6abe009 100644 --- a/drivers/gp2x/menu.c +++ b/drivers/gp2x/menu.c @@ -731,15 +731,14 @@ static void unbind_action(int action) Settings.JoyBinds[u][i] &= ~action; } -static int count_bound_keys(int action, int is_joy) +static int count_bound_keys(int action, int joy) { - int i, u, keys = 0; + int i, keys = 0; - if (is_joy) + if (joy) { - for (u = 0; u < 4; u++) - for (i = 0; i < 32; i++) - if (Settings.JoyBinds[u][i] & action) keys++; + for (i = 0; i < 32; i++) + if (Settings.JoyBinds[joy-1][i] & action) keys++; } else { @@ -824,7 +823,7 @@ static void key_config_loop(const bind_action_t *opts, int opt_cnt, int player_i { for (i = 0; i < 32; i++) if (inp & (1 << i)) { - if (count_bound_keys(opts[sel].mask, 1) >= 1) // disallow combos for usbjoy + if (count_bound_keys(opts[sel].mask, joy) >= 1) // disallow combos for usbjoy Settings.JoyBinds[joy-1][i] &= ~opts[sel].mask; else Settings.JoyBinds[joy-1][i] ^= opts[sel].mask; if (player_idx >= 0) { diff --git a/out_gp2x/readme.txt b/out_gp2x/readme.txt index 6fe6845..ab085ee 100644 --- a/out_gp2x/readme.txt +++ b/out_gp2x/readme.txt @@ -175,11 +175,12 @@ with additional .fcm extension added. Examples: ver 0.4 (by notaz) - rev 154 + rev 15x - Fixed savestate subsections (were causing some mapper data not to be saved). - Fixed an issue of MapIRQHook getting lost after loading a savestate (glitched Akumajou Densetsu and other games after savestate load). + - A bug, which prevented configuring multiple USB pads fixed. rev 153 - Lots of work on the asm core. Timing fixed for some instructions. Some missing undocumented instruction handlers added. Lots of -- 2.39.5