diff options
Diffstat (limited to '')
-rw-r--r-- | src/input_common/gcadapter/gc_adapter.cpp | 6 | ||||
-rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 6 | ||||
-rw-r--r-- | src/input_common/udp/client.cpp | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp index 02d06876f..74759ea7d 100644 --- a/src/input_common/gcadapter/gc_adapter.cpp +++ b/src/input_common/gcadapter/gc_adapter.cpp @@ -254,7 +254,7 @@ void Adapter::GetGCEndpoint(libusb_device* device) { sizeof(clear_payload), nullptr, 16); adapter_thread_running = true; - adapter_input_thread = std::thread([=] { Read(); }); // Read input + adapter_input_thread = std::thread(&Adapter::Read, this); } Adapter::~Adapter() { @@ -265,7 +265,9 @@ void Adapter::Reset() { if (adapter_thread_running) { adapter_thread_running = false; } - adapter_input_thread.join(); + if (adapter_input_thread.joinable()) { + adapter_input_thread.join(); + } adapter_controllers_status.fill(ControllerTypes::None); get_origin.fill(true); diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp index 96e22d3ad..f45983f3f 100644 --- a/src/input_common/gcadapter/gc_poller.cpp +++ b/src/input_common/gcadapter/gc_poller.cpp @@ -76,8 +76,7 @@ std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::Param // button is not an axis/stick button if (button_id != PAD_STICK_ID) { - auto button = std::make_unique<GCButton>(port, button_id, adapter.get()); - return std::move(button); + return std::make_unique<GCButton>(port, button_id, adapter.get()); } // For Axis buttons, used by the binary sticks. @@ -264,7 +263,8 @@ Common::ParamPackage GCAnalogFactory::GetNextInput() { if (analog_x_axis == -1) { analog_x_axis = axis; controller_number = static_cast<int>(port); - } else if (analog_y_axis == -1 && analog_x_axis != axis && controller_number == port) { + } else if (analog_y_axis == -1 && analog_x_axis != axis && + controller_number == static_cast<int>(port)) { analog_y_axis = axis; } } diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index e63c73c4f..6c95a8b42 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp @@ -9,7 +9,6 @@ #include <functional> #include <thread> #include <boost/asio.hpp> -#include <boost/bind.hpp> #include "common/logging/log.h" #include "input_common/udp/client.h" #include "input_common/udp/protocol.h" |