Browse Source
Merge pull request #4417 from lioncash/poll
gc_adapter/gc_poller: Resolve compiler warnings
pull/15/merge
bunnei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
src/input_common/gcadapter/gc_adapter.cpp
-
src/input_common/gcadapter/gc_poller.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() { |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|
|