mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 23:15:38 +00:00
Fixed an issue with adjusting SliderComponent values using the controller D-pad.
This commit is contained in:
parent
d75d2f41d1
commit
0dfe52586c
|
@ -40,21 +40,26 @@ SliderComponent::SliderComponent(
|
|||
|
||||
bool SliderComponent::input(InputConfig* config, Input input)
|
||||
{
|
||||
if (config->isMappedLike("left", input)) {
|
||||
if (input.value)
|
||||
setValue(mValue - mSingleIncrement);
|
||||
if (input.value != 0) {
|
||||
if (config->isMappedLike("left", input)) {
|
||||
if (input.value)
|
||||
setValue(mValue - mSingleIncrement);
|
||||
|
||||
mMoveRate = input.value ? -mSingleIncrement : 0;
|
||||
mMoveAccumulator = -MOVE_REPEAT_DELAY;
|
||||
return true;
|
||||
mMoveRate = input.value ? -mSingleIncrement : 0;
|
||||
mMoveAccumulator = -MOVE_REPEAT_DELAY;
|
||||
return true;
|
||||
}
|
||||
if (config->isMappedLike("right", input)) {
|
||||
if (input.value)
|
||||
setValue(mValue + mSingleIncrement);
|
||||
|
||||
mMoveRate = input.value ? mSingleIncrement : 0;
|
||||
mMoveAccumulator = -MOVE_REPEAT_DELAY;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (config->isMappedLike("right", input)) {
|
||||
if (input.value)
|
||||
setValue(mValue + mSingleIncrement);
|
||||
|
||||
mMoveRate = input.value ? mSingleIncrement : 0;
|
||||
mMoveAccumulator = -MOVE_REPEAT_DELAY;
|
||||
return true;
|
||||
else {
|
||||
mMoveRate = 0;
|
||||
}
|
||||
|
||||
return GuiComponent::input(config, input);
|
||||
|
|
Loading…
Reference in a new issue