summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-26 05:03:10 +0200
committerLioncash <mathew1800@gmail.com>2020-08-26 05:03:12 +0200
commitf60d5aac3e66e0daa16f808b50eced24417ce4a9 (patch)
treec501d7781a812b419820f5de3c7286542c184409 /src
parentMerge pull request #4582 from lioncash/xbyak (diff)
downloadyuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.tar
yuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.tar.gz
yuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.tar.bz2
yuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.tar.lz
yuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.tar.xz
yuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.tar.zst
yuzu-f60d5aac3e66e0daa16f808b50eced24417ce4a9.zip
Diffstat (limited to 'src')
-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 b346fdf8e..08f2ed602 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)) {