summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorCJBok <cjbok@ziggo.nl>2020-02-18 06:45:37 +0100
committerCJBok <cjbok@ziggo.nl>2020-02-18 06:45:37 +0100
commit23c4cc80e2ee13ce38b89e9a1388c239b37d5a49 (patch)
tree8966c39b56a3b4d92ca80e4f18a5c01a4a02d3c2 /src/input_common
parentMerge pull request #3412 from Morph1984/aspect-ratio (diff)
downloadyuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.tar
yuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.tar.gz
yuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.tar.bz2
yuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.tar.lz
yuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.tar.xz
yuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.tar.zst
yuzu-23c4cc80e2ee13ce38b89e9a1388c239b37d5a49.zip
Diffstat (limited to '')
-rwxr-xr-xsrc/input_common/analog_from_button.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/input_common/analog_from_button.cpp b/src/input_common/analog_from_button.cpp
index e1a260762..6cabdaa3c 100755
--- a/src/input_common/analog_from_button.cpp
+++ b/src/input_common/analog_from_button.cpp
@@ -34,6 +34,20 @@ public:
y * coef * (x == 0 ? 1.0f : SQRT_HALF));
}
+ bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override {
+ switch (direction) {
+ case Input::AnalogDirection::RIGHT:
+ return right->GetStatus();
+ case Input::AnalogDirection::LEFT:
+ return left->GetStatus();
+ case Input::AnalogDirection::UP:
+ return up->GetStatus();
+ case Input::AnalogDirection::DOWN:
+ return down->GetStatus();
+ }
+ return false;
+ }
+
private:
Button up;
Button down;