diff options
| author | 2020-07-06 23:01:57 -0400 | |
|---|---|---|
| committer | 2020-07-06 23:01:57 -0400 | |
| commit | e3253b5f1896605f94d661cae1a7333522b6aee8 (patch) | |
| tree | 491bece04d0603617e429e816f85281a3c601b22 /src/input_common/gcadapter/gc_poller.cpp | |
| parent | Recalibrate reconnected controllers (diff) | |
| download | yuzu-e3253b5f1896605f94d661cae1a7333522b6aee8.tar.gz yuzu-e3253b5f1896605f94d661cae1a7333522b6aee8.tar.xz yuzu-e3253b5f1896605f94d661cae1a7333522b6aee8.zip | |
Brace the code! Fix compile error due to class member construction order
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
| -rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp index c9bb7e571..ed99f98b4 100644 --- a/src/input_common/gcadapter/gc_poller.cpp +++ b/src/input_common/gcadapter/gc_poller.cpp | |||
| @@ -155,10 +155,11 @@ public: | |||
| 155 | // division is not by a perfect 128 to account for some variance in center location | 155 | // division is not by a perfect 128 to account for some variance in center location |
| 156 | // e.g. my device idled at 131 in X, 120 in Y, and full range of motion was in range | 156 | // e.g. my device idled at 131 in X, 120 in Y, and full range of motion was in range |
| 157 | // [20-230] | 157 | // [20-230] |
| 158 | if (axis % 2 == 0) | 158 | if (axis % 2 == 0) { |
| 159 | return (gcadapter->GetPadState()[port].axes.at(axis) - origin_value_x) / 95.0f; | 159 | return (gcadapter->GetPadState()[port].axes.at(axis) - origin_value_x) / 95.0f; |
| 160 | else | 160 | } else { |
| 161 | return (gcadapter->GetPadState()[port].axes.at(axis) - origin_value_y) / 95.0f; | 161 | return (gcadapter->GetPadState()[port].axes.at(axis) - origin_value_y) / 95.0f; |
| 162 | } | ||
| 162 | } | 163 | } |
| 163 | 164 | ||
| 164 | std::pair<float, float> GetAnalog(int axis_x, int axis_y) const { | 165 | std::pair<float, float> GetAnalog(int axis_x, int axis_y) const { |
| @@ -208,10 +209,10 @@ private: | |||
| 208 | const int axis_x; | 209 | const int axis_x; |
| 209 | const int axis_y; | 210 | const int axis_y; |
| 210 | const float deadzone; | 211 | const float deadzone; |
| 212 | GCAdapter::Adapter* gcadapter; | ||
| 211 | const float origin_value_x; | 213 | const float origin_value_x; |
| 212 | const float origin_value_y; | 214 | const float origin_value_y; |
| 213 | mutable std::mutex mutex; | 215 | mutable std::mutex mutex; |
| 214 | GCAdapter::Adapter* gcadapter; | ||
| 215 | }; | 216 | }; |
| 216 | 217 | ||
| 217 | /// An analog device factory that creates analog devices from GC Adapter | 218 | /// An analog device factory that creates analog devices from GC Adapter |