summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorameerj <aj662@drexel.edu>2020-08-10 18:39:42 +0200
committerameerj <aj662@drexel.edu>2020-08-10 18:46:14 +0200
commitd6672501ac74b9d0645e97f045ec2d8b9e5da289 (patch)
tree3c47b3398ec56c3d7d752449e5bc7f71b4703265 /src/input_common
parentAdd range slider functionality for gc adapter (diff)
downloadyuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.tar
yuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.tar.gz
yuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.tar.bz2
yuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.tar.lz
yuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.tar.xz
yuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.tar.zst
yuzu-d6672501ac74b9d0645e97f045ec2d8b9e5da289.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/gcadapter/gc_poller.cpp2
-rw-r--r--src/input_common/sdl/sdl_impl.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp
index 323b93459..b346fdf8e 100644
--- a/src/input_common/gcadapter/gc_poller.cpp
+++ b/src/input_common/gcadapter/gc_poller.cpp
@@ -233,7 +233,7 @@ std::unique_ptr<Input::AnalogDevice> GCAnalogFactory::Create(const Common::Param
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.50f, 1.50f);
+ const float range = std::clamp(params.Get("range", 1.0f), 0.50f, 1.50f);
return std::make_unique<GCAnalog>(port, axis_x, axis_y, deadzone, adapter.get(), range);
}
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 1853f535d..d76c279d3 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.50f, 1.50f);
+ const float range = std::clamp(params.Get("range", 1.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