diff options
author | bunnei <bunneidev@gmail.com> | 2020-09-04 02:23:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 02:23:33 +0200 |
commit | 3b0fe38e86e14a9fc915920c11ce2e9ab3f0f087 (patch) | |
tree | 031e96e8e24a656f29d6a79baa8d180d2da011ad /src/input_common/gcadapter/gc_poller.cpp | |
parent | Merge pull request #4578 from lioncash/xor (diff) | |
parent | gc_poller: Resolve compilation warnings on MSVC (diff) | |
download | yuzu-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/gcadapter/gc_poller.cpp')
-rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 8 |
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)) { |