From 4919040522d4c6a0d3fb64ebee2ffb51c37c8230 Mon Sep 17 00:00:00 2001 From: kub Date: Tue, 22 Feb 2022 20:55:19 +0000 Subject: [PATCH] fix for 4 player support --- menu.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/menu.c b/menu.c index 3cd69d2..929713d 100644 --- a/menu.c +++ b/menu.c @@ -1320,9 +1320,9 @@ static char *action_binds(int player_idx, int action_mask, int dev_id) if (player_idx >= 0) { can_combo = 0; type = IN_BINDTYPE_PLAYER12 + (player_idx >> 1); + if (player_idx & 1) + action_mask <<= 16; } - if (player_idx & 1) - action_mask <<= 16; if (dev_id >= 0) dev = dev_last = dev_id; @@ -1459,11 +1459,12 @@ static void key_config_loop(const me_bind_action *opts, int opt_cnt, int player_ dev_id = -1; // show all mask_shift = 0; - if (player_idx & 1) - mask_shift = 16; - bindtype = IN_BINDTYPE_EMU; - if (player_idx >= 0) - bindtype = IN_BINDTYPE_PLAYER12 + (player_idx >> 1); + if (player_idx >= 0) { + if (player_idx & 1) + mask_shift = 16; + bindtype = IN_BINDTYPE_PLAYER12 + (player_idx >> 1); + } else + bindtype = IN_BINDTYPE_EMU; for (;;) { -- 2.39.2