summaryrefslogtreecommitdiffstats
path: root/src/input_common/gcadapter/gc_poller.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-07-14 16:20:12 +0200
committerGitHub <noreply@github.com>2020-07-14 16:20:12 +0200
commit393cdb15f508d0b3b9db1592c4e081c0f21e907a (patch)
tree70219ad8f4744cc9a5f6e107a594909a3a2d7ea7 /src/input_common/gcadapter/gc_poller.cpp
parentMerge pull request #4315 from lioncash/udp-warn (diff)
parentgc_poller: Mark GCButtonFactory::GetNextInput() as const (diff)
downloadyuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.gz
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.bz2
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.lz
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.xz
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.zst
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.zip
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
-rw-r--r--src/input_common/gcadapter/gc_poller.cpp8
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 @@
#include <list>
#include <mutex>
#include <utility>
+#include "common/assert.h"
#include "common/threadsafe_queue.h"
#include "input_common/gcadapter/gc_adapter.h"
#include "input_common/gcadapter/gc_poller.h"
@@ -94,9 +95,12 @@ std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::Param
return std::make_unique<GCAxisButton>(port, axis, threshold, trigger_if_greater,
adapter.get());
}
+
+ UNREACHABLE();
+ return nullptr;
}
-Common::ParamPackage GCButtonFactory::GetNextInput() {
+Common::ParamPackage GCButtonFactory::GetNextInput() const {
Common::ParamPackage params;
GCAdapter::GCPadStatus pad;
auto& queue = adapter->GetPadQueue();
@@ -249,7 +253,7 @@ Common::ParamPackage GCAnalogFactory::GetNextInput() {
const u8 axis = static_cast<u8>(pad.axis);
if (analog_x_axis == -1) {
analog_x_axis = axis;
- controller_number = port;
+ controller_number = static_cast<int>(port);
} else if (analog_y_axis == -1 && analog_x_axis != axis && controller_number == port) {
analog_y_axis = axis;
}