diff options
| author | 2020-07-25 19:42:09 -0700 | |
|---|---|---|
| committer | 2020-07-25 19:42:09 -0700 | |
| commit | b69f902b18a6af7c95ab556e2bc9365c8e8aea09 (patch) | |
| tree | 1adf04384dadf67775b68aa35ce7f4d8d8ecf7f7 | |
| parent | Merge pull request #4429 from FearlessTobi/remove-duplicated-options (diff) | |
| parent | gc_adapter: Resolve C++20 deprecation warning (diff) | |
| download | yuzu-b69f902b18a6af7c95ab556e2bc9365c8e8aea09.tar.gz yuzu-b69f902b18a6af7c95ab556e2bc9365c8e8aea09.tar.xz yuzu-b69f902b18a6af7c95ab556e2bc9365c8e8aea09.zip | |
Merge pull request #4417 from lioncash/poll
gc_adapter/gc_poller: Resolve compiler warnings
Diffstat (limited to '')
| -rw-r--r-- | src/input_common/gcadapter/gc_adapter.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/gcadapter/gc_poller.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp index 02d06876f..29ea1f2c7 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) { | |||
| 254 | sizeof(clear_payload), nullptr, 16); | 254 | sizeof(clear_payload), nullptr, 16); |
| 255 | 255 | ||
| 256 | adapter_thread_running = true; | 256 | adapter_thread_running = true; |
| 257 | adapter_input_thread = std::thread([=] { Read(); }); // Read input | 257 | adapter_input_thread = std::thread(&Adapter::Read, this); |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | Adapter::~Adapter() { | 260 | Adapter::~Adapter() { |
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 | |||
| 76 | 76 | ||
| 77 | // button is not an axis/stick button | 77 | // button is not an axis/stick button |
| 78 | if (button_id != PAD_STICK_ID) { | 78 | if (button_id != PAD_STICK_ID) { |
| 79 | auto button = std::make_unique<GCButton>(port, button_id, adapter.get()); | 79 | return std::make_unique<GCButton>(port, button_id, adapter.get()); |
| 80 | return std::move(button); | ||
| 81 | } | 80 | } |
| 82 | 81 | ||
| 83 | // For Axis buttons, used by the binary sticks. | 82 | // For Axis buttons, used by the binary sticks. |
| @@ -264,7 +263,8 @@ Common::ParamPackage GCAnalogFactory::GetNextInput() { | |||
| 264 | if (analog_x_axis == -1) { | 263 | if (analog_x_axis == -1) { |
| 265 | analog_x_axis = axis; | 264 | analog_x_axis = axis; |
| 266 | controller_number = static_cast<int>(port); | 265 | controller_number = static_cast<int>(port); |
| 267 | } else if (analog_y_axis == -1 && analog_x_axis != axis && controller_number == port) { | 266 | } else if (analog_y_axis == -1 && analog_x_axis != axis && |
| 267 | controller_number == static_cast<int>(port)) { | ||
| 268 | analog_y_axis = axis; | 268 | analog_y_axis = axis; |
| 269 | } | 269 | } |
| 270 | } | 270 | } |