X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Fmenu.c;h=6f29f37e2179f884617eb186920a8d4da8acb3cb;hb=2c60056042e94007286e3e0e1789f4c9a78b7731;hp=b4a76cc2ae25ad2ba38f7cba9e5ec5e5d0bb8d5b;hpb=f15ca4db35a3466cc59b796c2a5d8b963721a02c;p=libpicofe.git diff --git a/common/menu.c b/common/menu.c index b4a76cc..6f29f37 100644 --- a/common/menu.c +++ b/common/menu.c @@ -1055,7 +1055,7 @@ static char *action_binds(int player_idx, int action_mask, int dev_id) if (binds == NULL) return static_buff; - count = in_get_dev_bind_count(dev_id); + count = in_get_dev_info(dev_id, IN_INFO_BIND_COUNT); for (k = 0; k < count; k++) { const char *xname; @@ -1088,7 +1088,7 @@ static int count_bound_keys(int dev_id, int action_mask, int player_idx) if (binds == NULL) return 0; - count = in_get_dev_bind_count(dev_id); + count = in_get_dev_info(dev_id, IN_INFO_BIND_COUNT); for (k = 0; k < count; k++) { if (!(binds[k] & action_mask)) @@ -1206,7 +1206,12 @@ static void key_config_loop(const me_bind_action *opts, int opt_cnt, int player_ for (is_down = 1; is_down; ) kc = in_update_keycode(&dev_id, &is_down, -1); - unbind = count_bound_keys(dev_id, opts[sel].mask, player_idx) >= 2; + i = count_bound_keys(dev_id, opts[sel].mask, player_idx); + unbind = (i > 0); + + /* allow combos if device supports them */ + if (i == 1 && in_get_dev_info(dev_id, IN_INFO_DOES_COMBOS)) + unbind = 0; in_bind_key(dev_id, kc, opts[sel].mask, unbind); if (player_idx >= 0) {