diff options
| author | 2021-02-07 20:53:46 -0800 | |
|---|---|---|
| committer | 2021-02-07 20:53:46 -0800 | |
| commit | 089608909254dfa4860705a29a6c33f6872d85a5 (patch) | |
| tree | c8f0924c8a9b67463883e405b2990005419ea619 /src/input_common/sdl/sdl_impl.cpp | |
| parent | Merge pull request #5872 from lioncash/svc-error (diff) | |
| parent | Add GC controller animation (diff) | |
| download | yuzu-089608909254dfa4860705a29a6c33f6872d85a5.tar.gz yuzu-089608909254dfa4860705a29a6c33f6872d85a5.tar.xz yuzu-089608909254dfa4860705a29a6c33f6872d85a5.zip | |
Merge pull request #5339 from german77/interactive
Settings: 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; |