diff options
author | bunnei <bunneidev@gmail.com> | 2020-07-14 16:20:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 16:20:12 +0200 |
commit | 393cdb15f508d0b3b9db1592c4e081c0f21e907a (patch) | |
tree | 70219ad8f4744cc9a5f6e107a594909a3a2d7ea7 /src/input_common/gcadapter/gc_poller.cpp | |
parent | Merge pull request #4315 from lioncash/udp-warn (diff) | |
parent | gc_poller: Mark GCButtonFactory::GetNextInput() as const (diff) | |
download | yuzu-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 '')
-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 @@ #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; } |