summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/gc_adapter.cpp
diff options
context:
space:
mode:
authorGravatar arades792023-02-14 11:13:47 -0500
committerGravatar arades792023-02-14 12:35:39 -0500
commit683019878fc939b418a65e1c5d84b066596d7655 (patch)
tree6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/input_common/drivers/gc_adapter.cpp
parentapply clang-format (diff)
downloadyuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz
yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz
yuzu-683019878fc939b418a65e1c5d84b066596d7655.zip
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/input_common/drivers/gc_adapter.cpp')
-rw-r--r--src/input_common/drivers/gc_adapter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp
index a4faab15e..d09ff178b 100644
--- a/src/input_common/drivers/gc_adapter.cpp
+++ b/src/input_common/drivers/gc_adapter.cpp
@@ -223,8 +223,8 @@ void GCAdapter::AdapterScanThread(std::stop_token stop_token) {
223} 223}
224 224
225bool GCAdapter::Setup() { 225bool GCAdapter::Setup() {
226 constexpr static u16 nintendo_vid = 0x057e; 226 constexpr u16 nintendo_vid = 0x057e;
227 constexpr static u16 gc_adapter_pid = 0x0337; 227 constexpr u16 gc_adapter_pid = 0x0337;
228 usb_adapter_handle = 228 usb_adapter_handle =
229 std::make_unique<LibUSBDeviceHandle>(libusb_ctx->get(), nintendo_vid, gc_adapter_pid); 229 std::make_unique<LibUSBDeviceHandle>(libusb_ctx->get(), nintendo_vid, gc_adapter_pid);
230 if (!usb_adapter_handle->get()) { 230 if (!usb_adapter_handle->get()) {
@@ -346,7 +346,7 @@ void GCAdapter::UpdateVibrations() {
346 // Use 8 states to keep the switching between on/off fast enough for 346 // Use 8 states to keep the switching between on/off fast enough for
347 // a human to feel different vibration strenght 347 // a human to feel different vibration strenght
348 // More states == more rumble strengths == slower update time 348 // More states == more rumble strengths == slower update time
349 constexpr static u8 vibration_states = 8; 349 constexpr u8 vibration_states = 8;
350 350
351 vibration_counter = (vibration_counter + 1) % vibration_states; 351 vibration_counter = (vibration_counter + 1) % vibration_states;
352 352
@@ -363,7 +363,7 @@ void GCAdapter::SendVibrations() {
363 return; 363 return;
364 } 364 }
365 s32 size{}; 365 s32 size{};
366 constexpr static u8 rumble_command = 0x11; 366 constexpr u8 rumble_command = 0x11;
367 const u8 p1 = pads[0].enable_vibration; 367 const u8 p1 = pads[0].enable_vibration;
368 const u8 p2 = pads[1].enable_vibration; 368 const u8 p2 = pads[1].enable_vibration;
369 const u8 p3 = pads[2].enable_vibration; 369 const u8 p3 = pads[2].enable_vibration;