summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp2
-rw-r--r--src/yuzu/configuration/configure_input_player.cpp6
-rw-r--r--src/yuzu/configuration/configure_input_player.ui3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 20a658a26..1853f535d 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -461,7 +461,7 @@ public:
const int axis_x = params.Get("axis_x", 0);
const int axis_y = params.Get("axis_y", 1);
const float deadzone = std::clamp(params.Get("deadzone", 0.0f), 0.0f, .99f);
- const float range = std::clamp(params.Get("range", 0.0f), 0.0f, .99f) + 0.50f;
+ const float range = std::clamp(params.Get("range", 0.0f), 0.50f, 1.50f);
auto joystick = state.GetSDLJoystickByGUID(guid, port);
// This is necessary so accessing GetAxis with axis_x and axis_y won't crash
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp
index 2ef952b67..8bc86b706 100644
--- a/src/yuzu/configuration/configure_input_player.cpp
+++ b/src/yuzu/configuration/configure_input_player.cpp
@@ -272,6 +272,8 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
ui->sliderRStickDeadzoneAndModifier};
analog_map_deadzone_and_modifier_slider_label = {ui->labelLStickDeadzoneAndModifier,
ui->labelRStickDeadzoneAndModifier};
+ ui->sliderLStickRange->setRange(50, 150);
+ ui->sliderRStickRange->setRange(50, 150);
analog_map_range_slider = {ui->sliderLStickRange, ui->sliderRStickRange};
analog_map_range_slider_label = {ui->labelLStickRange, ui->labelRStickRange};
@@ -386,7 +388,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
const auto engine = analogs_param[analog_id].Get("engine", "");
if (engine == "sdl" || engine == "gcpad") {
analog_map_range_slider_label[analog_id]->setText(
- tr("Range: %1%").arg(slider_value + 50.0f));
+ tr("Range: %1%").arg(slider_value));
analogs_param[analog_id].Set("range", slider_value / 100.0f);
}
});
@@ -613,7 +615,7 @@ void ConfigureInputPlayer::UpdateButtonLabels() {
}
// QtSlider returns values from 0.0-0.99. We want range to be from 50% to 150%
analog_stick_range->setValue(static_cast<int>(param.Get("range", 0.1f) * 100));
- if (analog_stick_range->value() == 0) {
+ if (analog_stick_range->value() == 50) {
analog_stick_range_label->setText(tr("Range: 50%"));
}
} else {
diff --git a/src/yuzu/configuration/configure_input_player.ui b/src/yuzu/configuration/configure_input_player.ui
index c68c9228b..91065dcde 100644
--- a/src/yuzu/configuration/configure_input_player.ui
+++ b/src/yuzu/configuration/configure_input_player.ui
@@ -222,7 +222,6 @@
</widget>
</item>
</layout>
-
</item>
<item row="6" column="0">
<spacer name="RStick_verticalSpacer">
@@ -840,7 +839,6 @@
</item>
</layout>
</item>
-
<item row="6" column="1" colspan="2">
<layout class="QVBoxLayout" name="sliderLStickRangeVerticalLayout">
<property name="sizeConstraint">
@@ -868,7 +866,6 @@
</widget>
</item>
</layout>
-
</item>
<item row="7" column="1">
<spacer name="LStick_verticalSpacer">