mirror of
https://github.com/holub/mame
synced 2025-05-18 19:49:35 +03:00
fix analog wrap+port_reaet combination (kanikani regression)
This commit is contained in:
parent
5e75100824
commit
e78f0ce0cf
@ -1734,11 +1734,7 @@ static INT32 apply_analog_settings(INT32 value, analog_field_state *analog)
|
|||||||
|
|
||||||
/* apply reversal if needed */
|
/* apply reversal if needed */
|
||||||
if (analog->reverse)
|
if (analog->reverse)
|
||||||
{
|
|
||||||
value = analog->reverse_val - value;
|
value = analog->reverse_val - value;
|
||||||
if (analog->wraps)
|
|
||||||
value--;
|
|
||||||
}
|
|
||||||
else if (analog->single_scale)
|
else if (analog->single_scale)
|
||||||
/* it's a pedal or the default value is equal to min/max */
|
/* it's a pedal or the default value is equal to min/max */
|
||||||
/* so we need to adjust the center to the minimum */
|
/* so we need to adjust the center to the minimum */
|
||||||
@ -2413,9 +2409,9 @@ static analog_field_state *init_field_analog_state(const input_field_config *fie
|
|||||||
/* positional controls reverse from their max range */
|
/* positional controls reverse from their max range */
|
||||||
state->reverse_val = state->maximum + state->minimum;
|
state->reverse_val = state->maximum + state->minimum;
|
||||||
|
|
||||||
// /* relative controls reverse from 1 past their max range */
|
/* relative controls reverse from 1 past their max range */
|
||||||
// if (state->positionalscale == 0)
|
if (state->wraps)
|
||||||
// state->reverse_val += INPUT_RELATIVE_PER_PIXEL;
|
state->reverse_val -= INPUT_RELATIVE_PER_PIXEL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user