Skip to content

Commit 4ed05b0

Browse files
committed
Turbo fire remapping fixes
1 parent fcded62 commit 4ed05b0

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

input/input_driver.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,9 +1531,14 @@ static int16_t input_state_device(
15311531
turbo_duty_cycle = turbo_period / 2;
15321532

15331533
/* Clear underlying button to prevent duplicates. */
1534-
if ( input_st->turbo_btns.frame_enable[port]
1535-
&& (int)id == settings->ints.input_turbo_bind)
1536-
res = 0;
1534+
if (input_st->turbo_btns.frame_enable[port])
1535+
{
1536+
unsigned turbo_bind = settings->ints.input_turbo_bind;
1537+
unsigned remap_bind = settings->uints.input_remap_ids[port][turbo_bind];
1538+
1539+
if (id == remap_bind)
1540+
res = 0;
1541+
}
15371542

15381543
if (turbo_mode > INPUT_TURBO_MODE_CLASSIC_TOGGLE)
15391544
{
@@ -1708,6 +1713,18 @@ static int16_t input_state_device(
17081713
reset_state = true;
17091714
else if (settings->uints.input_remap_ids[port][offset + 1] != (offset+1))
17101715
reset_state = true;
1716+
1717+
if (input_st->turbo_btns.frame_enable[port])
1718+
{
1719+
unsigned turbo_bind = settings->ints.input_turbo_bind;
1720+
unsigned remap_bind = settings->uints.input_remap_ids[port][turbo_bind];
1721+
1722+
if (offset == remap_bind || offset + 1 == remap_bind)
1723+
{
1724+
res = 0;
1725+
break;
1726+
}
1727+
}
17111728
}
17121729

17131730
if (reset_state)

0 commit comments

Comments
 (0)