diff options
author | german77 <juangerman-13@hotmail.com> | 2021-09-07 03:24:39 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2021-09-07 05:20:19 +0200 |
commit | 4bc3c788f5e91dabb96ba3139f674d2252e7169f (patch) | |
tree | 75410bc80595437fb1db842f45cfc5055c27d332 /src/input_common/sdl | |
parent | Merge pull request #6965 from bunnei/cpu_manager_jthread (diff) | |
download | yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.tar yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.tar.gz yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.tar.bz2 yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.tar.lz yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.tar.xz yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.tar.zst yuzu-4bc3c788f5e91dabb96ba3139f674d2252e7169f.zip |
Diffstat (limited to 'src/input_common/sdl')
-rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index f102410d1..8723acc31 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -254,11 +254,25 @@ public: } bool IsJoyconLeft() const { - return std::strstr(GetControllerName().c_str(), "Joy-Con Left") != nullptr; + const std::string controller_name = GetControllerName(); + if (std::strstr(controller_name.c_str(), "Joy-Con Left") != nullptr) { + return true; + } + if (std::strstr(controller_name.c_str(), "Joy-Con (L)") != nullptr) { + return true; + } + return false; } bool IsJoyconRight() const { - return std::strstr(GetControllerName().c_str(), "Joy-Con Right") != nullptr; + const std::string controller_name = GetControllerName(); + if (std::strstr(controller_name.c_str(), "Joy-Con Right") != nullptr) { + return true; + } + if (std::strstr(controller_name.c_str(), "Joy-Con (R)") != nullptr) { + return true; + } + return false; } std::string GetControllerName() const { |