diff options
| author | 2021-01-12 21:09:59 -0600 | |
|---|---|---|
| committer | 2021-02-06 09:43:41 -0600 | |
| commit | 481cd86722f7070b6a63f2b95c1e8bceb518eee7 (patch) | |
| tree | 5ec35ba24ca028b381f80963d40c2ed375229b84 /src/input_common/sdl/sdl_impl.cpp | |
| parent | Merge pull request #5326 from german77/hidUpdate1 (diff) | |
| download | yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.gz yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.tar.xz yuzu-481cd86722f7070b6a63f2b95c1e8bceb518eee7.zip | |
Make settings controller image change with controller input
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
| -rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 10 |
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: | |||
| 377 | return {}; | 377 | return {}; |
| 378 | } | 378 | } |
| 379 | 379 | ||
| 380 | std::tuple<float, float> GetRawStatus() const override { | ||
| 381 | const float x = joystick->GetAxis(axis_x, range); | ||
| 382 | const float y = joystick->GetAxis(axis_y, range); | ||
| 383 | return {x, -y}; | ||
| 384 | } | ||
| 385 | |||
| 386 | Input::AnalogProperties GetAnalogProperties() const override { | ||
| 387 | return {deadzone, range, 0.5f}; | ||
| 388 | } | ||
| 389 | |||
| 380 | bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override { | 390 | bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override { |
| 381 | const auto [x, y] = GetStatus(); | 391 | const auto [x, y] = GetStatus(); |
| 382 | const float directional_deadzone = 0.5f; | 392 | const float directional_deadzone = 0.5f; |