summaryrefslogtreecommitdiff
path: root/src/input_common
diff options
context:
space:
mode:
authorGravatar Lioncash2020-07-12 15:36:27 -0400
committerGravatar Lioncash2020-07-12 15:36:27 -0400
commit9ce6ea648f7cb51f5411d3e0753ef9a3439381c5 (patch)
tree9d689e6fb90cc578efc56fd9204910e100180e7f /src/input_common
parentMerge pull request #4221 from jbeich/unused-qt-opengl (diff)
downloadyuzu-9ce6ea648f7cb51f5411d3e0753ef9a3439381c5.tar.gz
yuzu-9ce6ea648f7cb51f5411d3e0753ef9a3439381c5.tar.xz
yuzu-9ce6ea648f7cb51f5411d3e0753ef9a3439381c5.zip
gc_adapter: Silence sign conversion warnings
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/gcadapter/gc_adapter.cpp8
-rw-r--r--src/input_common/gcadapter/gc_adapter.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp
index 6d9f4d9eb..9fa170711 100644
--- a/src/input_common/gcadapter/gc_adapter.cpp
+++ b/src/input_common/gcadapter/gc_adapter.cpp
@@ -33,7 +33,7 @@ Adapter::Adapter() {
33 } 33 }
34} 34}
35 35
36GCPadStatus Adapter::GetPadStatus(int port, const std::array<u8, 37>& adapter_payload) { 36GCPadStatus Adapter::GetPadStatus(std::size_t port, const std::array<u8, 37>& adapter_payload) {
37 GCPadStatus pad = {}; 37 GCPadStatus pad = {};
38 bool get_origin = false; 38 bool get_origin = false;
39 39
@@ -227,7 +227,7 @@ void Adapter::Setup() {
227 } 227 }
228 228
229 if (devices != nullptr) { 229 if (devices != nullptr) {
230 for (std::size_t index = 0; index < device_count; ++index) { 230 for (std::size_t index = 0; index < static_cast<std::size_t>(device_count); ++index) {
231 if (CheckDeviceAccess(devices[index])) { 231 if (CheckDeviceAccess(devices[index])) {
232 // GC Adapter found and accessible, registering it 232 // GC Adapter found and accessible, registering it
233 GetGCEndpoint(devices[index]); 233 GetGCEndpoint(devices[index]);
@@ -357,11 +357,11 @@ void Adapter::Reset() {
357 } 357 }
358} 358}
359 359
360bool Adapter::DeviceConnected(int port) { 360bool Adapter::DeviceConnected(std::size_t port) {
361 return adapter_controllers_status[port] != ControllerTypes::None; 361 return adapter_controllers_status[port] != ControllerTypes::None;
362} 362}
363 363
364void Adapter::ResetDeviceType(int port) { 364void Adapter::ResetDeviceType(std::size_t port) {
365 adapter_controllers_status[port] = ControllerTypes::None; 365 adapter_controllers_status[port] = ControllerTypes::None;
366} 366}
367 367
diff --git a/src/input_common/gcadapter/gc_adapter.h b/src/input_common/gcadapter/gc_adapter.h
index b1c2a1958..250c2275a 100644
--- a/src/input_common/gcadapter/gc_adapter.h
+++ b/src/input_common/gcadapter/gc_adapter.h
@@ -104,7 +104,7 @@ public:
104 const std::array<GCState, 4>& GetPadState() const; 104 const std::array<GCState, 4>& GetPadState() const;
105 105
106private: 106private:
107 GCPadStatus GetPadStatus(int port, const std::array<u8, 37>& adapter_payload); 107 GCPadStatus GetPadStatus(std::size_t port, const std::array<u8, 37>& adapter_payload);
108 108
109 void PadToState(const GCPadStatus& pad, GCState& state); 109 void PadToState(const GCPadStatus& pad, GCState& state);
110 110
@@ -117,10 +117,10 @@ private:
117 void StopScanThread(); 117 void StopScanThread();
118 118
119 /// Returns true if there is a device connected to port 119 /// Returns true if there is a device connected to port
120 bool DeviceConnected(int port); 120 bool DeviceConnected(std::size_t port);
121 121
122 /// Resets status of device connected to port 122 /// Resets status of device connected to port
123 void ResetDeviceType(int port); 123 void ResetDeviceType(std::size_t port);
124 124
125 /// Returns true if we successfully gain access to GC Adapter 125 /// Returns true if we successfully gain access to GC Adapter
126 bool CheckDeviceAccess(libusb_device* device); 126 bool CheckDeviceAccess(libusb_device* device);