diff options
author | bunnei <bunneidev@gmail.com> | 2020-09-10 04:27:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 04:27:49 +0200 |
commit | d90961122ca4d3a1c1f452e1d1b3fb14f790334e (patch) | |
tree | e47b3689f1ea1d45dcd0d1e3b205df24368499b3 /src/input_common/gcadapter/gc_poller.cpp | |
parent | Merge pull request #4606 from lioncash/constexpr (diff) | |
parent | gc_adapter: Make DeviceConnected() a const member function (diff) | |
download | yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.tar yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.tar.gz yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.tar.bz2 yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.tar.lz yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.tar.xz yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.tar.zst yuzu-d90961122ca4d3a1c1f452e1d1b3fb14f790334e.zip |
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
-rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp index 1c8d8523a..92e9e8e89 100644 --- a/src/input_common/gcadapter/gc_poller.cpp +++ b/src/input_common/gcadapter/gc_poller.cpp @@ -15,7 +15,7 @@ namespace InputCommon { class GCButton final : public Input::ButtonDevice { public: - explicit GCButton(int port_, int button_, GCAdapter::Adapter* adapter) + explicit GCButton(int port_, int button_, const GCAdapter::Adapter* adapter) : port(port_), button(button_), gcadapter(adapter) {} ~GCButton() override; @@ -30,13 +30,13 @@ public: private: const int port; const int button; - GCAdapter::Adapter* gcadapter; + const GCAdapter::Adapter* gcadapter; }; class GCAxisButton final : public Input::ButtonDevice { public: explicit GCAxisButton(int port_, int axis_, float threshold_, bool trigger_if_greater_, - GCAdapter::Adapter* adapter) + const GCAdapter::Adapter* adapter) : port(port_), axis(axis_), threshold(threshold_), trigger_if_greater(trigger_if_greater_), gcadapter(adapter), origin_value(static_cast<float>(adapter->GetOriginValue(port_, axis_))) {} @@ -60,7 +60,7 @@ private: const int axis; float threshold; bool trigger_if_greater; - GCAdapter::Adapter* gcadapter; + const GCAdapter::Adapter* gcadapter; const float origin_value; }; @@ -149,8 +149,8 @@ void GCButtonFactory::EndConfiguration() { class GCAnalog final : public Input::AnalogDevice { public: - GCAnalog(int port_, int axis_x_, int axis_y_, float deadzone_, GCAdapter::Adapter* adapter, - float range_) + GCAnalog(int port_, int axis_x_, int axis_y_, float deadzone_, + const GCAdapter::Adapter* adapter, float range_) : port(port_), axis_x(axis_x_), axis_y(axis_y_), deadzone(deadzone_), gcadapter(adapter), origin_value_x(static_cast<float>(adapter->GetOriginValue(port_, axis_x_))), origin_value_y(static_cast<float>(adapter->GetOriginValue(port_, axis_y_))), @@ -212,7 +212,7 @@ private: const int axis_x; const int axis_y; const float deadzone; - GCAdapter::Adapter* gcadapter; + const GCAdapter::Adapter* gcadapter; const float origin_value_x; const float origin_value_y; const float range; |