summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-09-04 02:23:33 +0200
committerGitHub <noreply@github.com>2020-09-04 02:23:33 +0200
commit3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087 (patch)
tree031e96e8e24a656f29d6a79baa8d180d2da011ad /src/input_common
parentMerge pull request #4578 from lioncash/xor (diff)
parentgc_poller: Resolve compilation warnings on MSVC (diff)
downloadyuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.tar
yuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.tar.gz
yuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.tar.bz2
yuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.tar.lz
yuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.tar.xz
yuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.tar.zst
yuzu-3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/gcadapter/gc_poller.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp
index 71cd85eeb..1c8d8523a 100644
--- a/src/input_common/gcadapter/gc_poller.cpp
+++ b/src/input_common/gcadapter/gc_poller.cpp
@@ -38,7 +38,8 @@ public:
explicit GCAxisButton(int port_, int axis_, float threshold_, bool trigger_if_greater_,
GCAdapter::Adapter* adapter)
: port(port_), axis(axis_), threshold(threshold_), trigger_if_greater(trigger_if_greater_),
- gcadapter(adapter), origin_value(adapter->GetOriginValue(port_, axis_)) {}
+ gcadapter(adapter),
+ origin_value(static_cast<float>(adapter->GetOriginValue(port_, axis_))) {}
bool GetStatus() const override {
if (gcadapter->DeviceConnected(port)) {
@@ -151,8 +152,9 @@ public:
GCAnalog(int port_, int axis_x_, int axis_y_, float deadzone_, GCAdapter::Adapter* adapter,
float range_)
: port(port_), axis_x(axis_x_), axis_y(axis_y_), deadzone(deadzone_), gcadapter(adapter),
- origin_value_x(adapter->GetOriginValue(port_, axis_x_)),
- origin_value_y(adapter->GetOriginValue(port_, axis_y_)), range(range_) {}
+ origin_value_x(static_cast<float>(adapter->GetOriginValue(port_, axis_x_))),
+ origin_value_y(static_cast<float>(adapter->GetOriginValue(port_, axis_y_))),
+ range(range_) {}
float GetAxis(int axis) const {
if (gcadapter->DeviceConnected(port)) {