summaryrefslogtreecommitdiffstats
path: root/src/input_common/helpers/joycon_driver.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2023-01-14 06:29:05 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2023-01-20 07:51:45 +0100
commit340f15d1fa79594dbe12a6e19140ba012751b533 (patch)
tree7a9ef54a17f927e4b8cf98dd32dd6d41c0d75201 /src/input_common/helpers/joycon_driver.cpp
parentcore: hid: Only set the polling mode to the correct side (diff)
downloadyuzu-340f15d1fa79594dbe12a6e19140ba012751b533.tar
yuzu-340f15d1fa79594dbe12a6e19140ba012751b533.tar.gz
yuzu-340f15d1fa79594dbe12a6e19140ba012751b533.tar.bz2
yuzu-340f15d1fa79594dbe12a6e19140ba012751b533.tar.lz
yuzu-340f15d1fa79594dbe12a6e19140ba012751b533.tar.xz
yuzu-340f15d1fa79594dbe12a6e19140ba012751b533.tar.zst
yuzu-340f15d1fa79594dbe12a6e19140ba012751b533.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/helpers/joycon_driver.cpp8
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() {
}
void JoyconDriver::InputThread(std::stop_token stop_token) {
- LOG_INFO(Input, "JC Adapter input thread started");
+ LOG_INFO(Input, "Joycon Adapter input thread started");
Common::SetCurrentThreadName("JoyconInput");
input_thread_running = true;
@@ -157,7 +157,7 @@ void JoyconDriver::InputThread(std::stop_token stop_token) {
is_connected = false;
input_thread_running = false;
- LOG_INFO(Input, "JC Adapter input thread stopped");
+ LOG_INFO(Input, "Joycon Adapter input thread stopped");
}
void JoyconDriver::OnNewData(std::span<u8> buffer) {
@@ -349,7 +349,7 @@ JoyconDriver::SupportedFeatures JoyconDriver::GetSupportedFeatures() {
}
bool JoyconDriver::IsInputThreadValid() const {
- if (!is_connected) {
+ if (!is_connected.load()) {
return false;
}
if (hidapi_handle->handle == nullptr) {
@@ -491,7 +491,7 @@ DriverResult JoyconDriver::SetRingConMode() {
bool JoyconDriver::IsConnected() const {
std::scoped_lock lock{mutex};
- return is_connected;
+ return is_connected.load();
}
bool JoyconDriver::IsVibrationEnabled() const {