summaryrefslogtreecommitdiffstats
path: root/src/input_common/gcadapter/gc_adapter.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-07-14 16:20:12 +0200
committerGitHub <noreply@github.com>2020-07-14 16:20:12 +0200
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
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 '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() {
}
}
-GCPadStatus Adapter::GetPadStatus(int port, const std::array<u8, 37>& adapter_payload) {
+GCPadStatus Adapter::GetPadStatus(std::size_t port, const std::array<u8, 37>& adapter_payload) {
GCPadStatus pad = {};
bool get_origin = false;
@@ -199,7 +199,7 @@ void Adapter::StartScanThread() {
}
detect_thread_running = true;
- detect_thread = std::thread([=] { ScanThreadFunc(); });
+ detect_thread = std::thread(&Adapter::ScanThreadFunc, this);
}
void Adapter::StopScanThread() {
@@ -228,7 +228,7 @@ void Adapter::Setup() {
}
if (devices != nullptr) {
- for (std::size_t index = 0; index < device_count; ++index) {
+ for (std::size_t index = 0; index < static_cast<std::size_t>(device_count); ++index) {
if (CheckDeviceAccess(devices[index])) {
// GC Adapter found and accessible, registering it
GetGCEndpoint(devices[index]);
@@ -358,11 +358,11 @@ void Adapter::Reset() {
}
}
-bool Adapter::DeviceConnected(int port) {
+bool Adapter::DeviceConnected(std::size_t port) {
return adapter_controllers_status[port] != ControllerTypes::None;
}
-void Adapter::ResetDeviceType(int port) {
+void Adapter::ResetDeviceType(std::size_t port) {
adapter_controllers_status[port] = ControllerTypes::None;
}