summaryrefslogtreecommitdiff
path: root/src/input_common/gcadapter/gc_adapter.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-07-14 10:20:12 -0400
committerGravatar GitHub2020-07-14 10:20:12 -0400
commit393cdb15f508d0b3b9db1592c4e081c0f21e907a (patch)
tree70219ad8f4744cc9a5f6e107a594909a3a2d7ea7 /src/input_common/gcadapter/gc_adapter.cpp
parentMerge pull request #4315 from lioncash/udp-warn (diff)
parentgc_poller: Mark GCButtonFactory::GetNextInput() as const (diff)
downloadyuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.gz
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.tar.xz
yuzu-393cdb15f508d0b3b9db1592c4e081c0f21e907a.zip
Merge pull request #4314 from lioncash/input-warn
gcadapter: Tidy up compiler warnings
Diffstat (limited to 'src/input_common/gcadapter/gc_adapter.cpp')
-rw-r--r--src/input_common/gcadapter/gc_adapter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp
index c031fc22a..38210ffcb 100644
--- a/src/input_common/gcadapter/gc_adapter.cpp
+++ b/src/input_common/gcadapter/gc_adapter.cpp
@@ -34,7 +34,7 @@ Adapter::Adapter() {
34 } 34 }
35} 35}
36 36
37GCPadStatus Adapter::GetPadStatus(int port, const std::array<u8, 37>& adapter_payload) { 37GCPadStatus Adapter::GetPadStatus(std::size_t port, const std::array<u8, 37>& adapter_payload) {
38 GCPadStatus pad = {}; 38 GCPadStatus pad = {};
39 bool get_origin = false; 39 bool get_origin = false;
40 40
@@ -199,7 +199,7 @@ void Adapter::StartScanThread() {
199 } 199 }
200 200
201 detect_thread_running = true; 201 detect_thread_running = true;
202 detect_thread = std::thread([=] { ScanThreadFunc(); }); 202 detect_thread = std::thread(&Adapter::ScanThreadFunc, this);
203} 203}
204 204
205void Adapter::StopScanThread() { 205void Adapter::StopScanThread() {
@@ -228,7 +228,7 @@ void Adapter::Setup() {
228 } 228 }
229 229
230 if (devices != nullptr) { 230 if (devices != nullptr) {
231 for (std::size_t index = 0; index < device_count; ++index) { 231 for (std::size_t index = 0; index < static_cast<std::size_t>(device_count); ++index) {
232 if (CheckDeviceAccess(devices[index])) { 232 if (CheckDeviceAccess(devices[index])) {
233 // GC Adapter found and accessible, registering it 233 // GC Adapter found and accessible, registering it
234 GetGCEndpoint(devices[index]); 234 GetGCEndpoint(devices[index]);
@@ -358,11 +358,11 @@ void Adapter::Reset() {
358 } 358 }
359} 359}
360 360
361bool Adapter::DeviceConnected(int port) { 361bool Adapter::DeviceConnected(std::size_t port) {
362 return adapter_controllers_status[port] != ControllerTypes::None; 362 return adapter_controllers_status[port] != ControllerTypes::None;
363} 363}
364 364
365void Adapter::ResetDeviceType(int port) { 365void Adapter::ResetDeviceType(std::size_t port) {
366 adapter_controllers_status[port] = ControllerTypes::None; 366 adapter_controllers_status[port] = ControllerTypes::None;
367} 367}
368 368