}
}
+ kbinds = binds[IN_BIND_OFFS(k, IN_BINDTYPE_PLAYER34)];
+ for (i = 0; kbinds && me_ctrl_actions[i].name != NULL; i++) {
+ mask = me_ctrl_actions[i].mask;
+ if (mask & kbinds) {
+ strncpy(act, me_ctrl_actions[i].name, 31);
+ fprintf(f, "bind %s = player3 %s\n", name, mystrip(act));
+ kbinds &= ~mask;
+ }
+ mask = me_ctrl_actions[i].mask << 16;
+ if (mask & kbinds) {
+ strncpy(act, me_ctrl_actions[i].name, 31);
+ fprintf(f, "bind %s = player4 %s\n", name, mystrip(act));
+ kbinds &= ~mask;
+ }
+ }
+
kbinds = binds[IN_BIND_OFFS(k, IN_BINDTYPE_EMU)];
for (i = 0; kbinds && emuctrl_actions[i].name != NULL; i++) {
mask = emuctrl_actions[i].mask;
int player, shift = 0;
player = atoi(val + 6) - 1;
- if ((unsigned int)player > 1)
+ if ((unsigned int)player > 3)
return -1;
- if (player == 1)
+ if (player & 1)
shift = 16;
- *type = IN_BINDTYPE_PLAYER12;
+ *type = IN_BINDTYPE_PLAYER12 + (player >> 1);
for (i = 0; me_ctrl_actions[i].name != NULL; i++) {
if (strncasecmp(me_ctrl_actions[i].name, val + 8, strlen(val + 8)) == 0)
return me_ctrl_actions[i].mask << shift;
type = IN_BINDTYPE_EMU;\r
if (player_idx >= 0) {\r
can_combo = 0;\r
- type = IN_BINDTYPE_PLAYER12;\r
+ type = IN_BINDTYPE_PLAYER12 + (player_idx >> 1);\r
}\r
- if (player_idx == 1)\r
+ if (player_idx & 1)\r
action_mask <<= 16;\r
\r
if (dev_id >= 0)\r
\r
dev_id = -1; // show all\r
mask_shift = 0;\r
- if (player_idx == 1)\r
+ if (player_idx & 1)\r
mask_shift = 16;\r
- bindtype = player_idx >= 0 ? IN_BINDTYPE_PLAYER12 : IN_BINDTYPE_EMU;\r
+ bindtype = IN_BINDTYPE_EMU;\r
+ if (player_idx >= 0)\r
+ bindtype = IN_BINDTYPE_PLAYER12 + (player_idx >> 1);\r
\r
for (;;)\r
{\r