From 4bc3c788f5e91dabb96ba3139f674d2252e7169f Mon Sep 17 00:00:00 2001
From: german77 <juangerman-13@hotmail.com>
Date: Mon, 6 Sep 2021 20:24:39 -0500
Subject: [PATCH] input_common: Add alternative string for joycons

---
 src/input_common/sdl/sdl_impl.cpp | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index f102410d17..8723acc315 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 {