diff options
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
| -rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp index 385ce8430..bddfa102f 100644 --- a/src/input_common/gcadapter/gc_poller.cpp +++ b/src/input_common/gcadapter/gc_poller.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <list> | 6 | #include <list> |
| 7 | #include <mutex> | 7 | #include <mutex> |
| 8 | #include <utility> | 8 | #include <utility> |
| 9 | #include "common/assert.h" | ||
| 9 | #include "common/threadsafe_queue.h" | 10 | #include "common/threadsafe_queue.h" |
| 10 | #include "input_common/gcadapter/gc_adapter.h" | 11 | #include "input_common/gcadapter/gc_adapter.h" |
| 11 | #include "input_common/gcadapter/gc_poller.h" | 12 | #include "input_common/gcadapter/gc_poller.h" |
| @@ -94,9 +95,12 @@ std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::Param | |||
| 94 | return std::make_unique<GCAxisButton>(port, axis, threshold, trigger_if_greater, | 95 | return std::make_unique<GCAxisButton>(port, axis, threshold, trigger_if_greater, |
| 95 | adapter.get()); | 96 | adapter.get()); |
| 96 | } | 97 | } |
| 98 | |||
| 99 | UNREACHABLE(); | ||
| 100 | return nullptr; | ||
| 97 | } | 101 | } |
| 98 | 102 | ||
| 99 | Common::ParamPackage GCButtonFactory::GetNextInput() { | 103 | Common::ParamPackage GCButtonFactory::GetNextInput() const { |
| 100 | Common::ParamPackage params; | 104 | Common::ParamPackage params; |
| 101 | GCAdapter::GCPadStatus pad; | 105 | GCAdapter::GCPadStatus pad; |
| 102 | auto& queue = adapter->GetPadQueue(); | 106 | auto& queue = adapter->GetPadQueue(); |
| @@ -249,7 +253,7 @@ Common::ParamPackage GCAnalogFactory::GetNextInput() { | |||
| 249 | const u8 axis = static_cast<u8>(pad.axis); | 253 | const u8 axis = static_cast<u8>(pad.axis); |
| 250 | if (analog_x_axis == -1) { | 254 | if (analog_x_axis == -1) { |
| 251 | analog_x_axis = axis; | 255 | analog_x_axis = axis; |
| 252 | controller_number = port; | 256 | controller_number = static_cast<int>(port); |
| 253 | } else if (analog_y_axis == -1 && analog_x_axis != axis && controller_number == port) { | 257 | } else if (analog_y_axis == -1 && analog_x_axis != axis && controller_number == port) { |
| 254 | analog_y_axis = axis; | 258 | analog_y_axis = axis; |
| 255 | } | 259 | } |