summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/joycon.cpp
diff options
context:
space:
mode:
authorGravatar arades792023-02-11 13:28:03 -0500
committerGravatar arades792023-02-14 12:33:11 -0500
commit45e13b03f372230dbf780f3fa87dd88f388af605 (patch)
tree555593e7e5016b6ba2a777d7417ada244abce458 /src/input_common/drivers/joycon.cpp
parentMerge pull request #9795 from Kelebek1/biquad_fix (diff)
downloadyuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.gz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.xz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.zip
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/input_common/drivers/joycon.cpp')
-rw-r--r--src/input_common/drivers/joycon.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp
index afc33db57..a93bb5c25 100644
--- a/src/input_common/drivers/joycon.cpp
+++ b/src/input_common/drivers/joycon.cpp
@@ -77,7 +77,7 @@ void Joycons::Setup() {
77} 77}
78 78
79void Joycons::ScanThread(std::stop_token stop_token) { 79void Joycons::ScanThread(std::stop_token stop_token) {
80 constexpr u16 nintendo_vendor_id = 0x057e; 80 constexpr static u16 nintendo_vendor_id = 0x057e;
81 Common::SetCurrentThreadName("JoyconScanThread"); 81 Common::SetCurrentThreadName("JoyconScanThread");
82 82
83 do { 83 do {
@@ -390,7 +390,7 @@ void Joycons::OnMotionUpdate(std::size_t port, Joycon::ControllerType type, int
390void Joycons::OnRingConUpdate(f32 ring_data) { 390void Joycons::OnRingConUpdate(f32 ring_data) {
391 // To simplify ring detection it will always be mapped to an empty identifier for all 391 // To simplify ring detection it will always be mapped to an empty identifier for all
392 // controllers 392 // controllers
393 constexpr PadIdentifier identifier = { 393 constexpr static PadIdentifier identifier = {
394 .guid = Common::UUID{}, 394 .guid = Common::UUID{},
395 .port = 0, 395 .port = 0,
396 .pad = 0, 396 .pad = 0,