summaryrefslogtreecommitdiffstats
path: root/src/input_common/sdl
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2021-01-13 04:09:59 +0100
committergerman <german@thesoftwareartisans.com>2021-02-06 16:43:41 +0100
commit481cd86722f7070b6a63f2b95c1e8bceb518eee7 (patch)
tree5ec35ba24ca028b381f80963d40c2ed375229b84 /src/input_common/sdl
parentMerge pull request #5326 from german77/hidUpdate1 (diff)
downloadyuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar
yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.gz
yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.bz2
yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.lz
yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.xz
yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.zst
yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.zip
Diffstat (limited to 'src/input_common/sdl')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 1b5750937..f67de37e3 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -377,6 +377,16 @@ public:
return {};
}
+ std::tuple<float, float> GetRawStatus() const override {
+ const float x = joystick->GetAxis(axis_x, range);
+ const float y = joystick->GetAxis(axis_y, range);
+ return {x, -y};
+ }
+
+ Input::AnalogProperties GetAnalogProperties() const override {
+ return {deadzone, range, 0.5f};
+ }
+
bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override {
const auto [x, y] = GetStatus();
const float directional_deadzone = 0.5f;