diff options
Diffstat (limited to 'src/input_common/helpers/joycon_driver.cpp')
| -rw-r--r-- | src/input_common/helpers/joycon_driver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/helpers/joycon_driver.cpp b/src/input_common/helpers/joycon_driver.cpp index 552572343..4159e5717 100644 --- a/src/input_common/helpers/joycon_driver.cpp +++ b/src/input_common/helpers/joycon_driver.cpp | |||
| @@ -123,7 +123,7 @@ DriverResult JoyconDriver::InitializeDevice() { | |||
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void JoyconDriver::InputThread(std::stop_token stop_token) { | 125 | void JoyconDriver::InputThread(std::stop_token stop_token) { |
| 126 | LOG_INFO(Input, "JC Adapter input thread started"); | 126 | LOG_INFO(Input, "Joycon Adapter input thread started"); |
| 127 | Common::SetCurrentThreadName("JoyconInput"); | 127 | Common::SetCurrentThreadName("JoyconInput"); |
| 128 | input_thread_running = true; | 128 | input_thread_running = true; |
| 129 | 129 | ||
| @@ -157,7 +157,7 @@ void JoyconDriver::InputThread(std::stop_token stop_token) { | |||
| 157 | 157 | ||
| 158 | is_connected = false; | 158 | is_connected = false; |
| 159 | input_thread_running = false; | 159 | input_thread_running = false; |
| 160 | LOG_INFO(Input, "JC Adapter input thread stopped"); | 160 | LOG_INFO(Input, "Joycon Adapter input thread stopped"); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | void JoyconDriver::OnNewData(std::span<u8> buffer) { | 163 | void JoyconDriver::OnNewData(std::span<u8> buffer) { |
| @@ -349,7 +349,7 @@ JoyconDriver::SupportedFeatures JoyconDriver::GetSupportedFeatures() { | |||
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | bool JoyconDriver::IsInputThreadValid() const { | 351 | bool JoyconDriver::IsInputThreadValid() const { |
| 352 | if (!is_connected) { | 352 | if (!is_connected.load()) { |
| 353 | return false; | 353 | return false; |
| 354 | } | 354 | } |
| 355 | if (hidapi_handle->handle == nullptr) { | 355 | if (hidapi_handle->handle == nullptr) { |
| @@ -491,7 +491,7 @@ DriverResult JoyconDriver::SetRingConMode() { | |||
| 491 | 491 | ||
| 492 | bool JoyconDriver::IsConnected() const { | 492 | bool JoyconDriver::IsConnected() const { |
| 493 | std::scoped_lock lock{mutex}; | 493 | std::scoped_lock lock{mutex}; |
| 494 | return is_connected; | 494 | return is_connected.load(); |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | bool JoyconDriver::IsVibrationEnabled() const { | 497 | bool JoyconDriver::IsVibrationEnabled() const { |