mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
input_common: Add alternative string for joycons
This commit is contained in:
parent
51ccc29cdd
commit
4bc3c788f5
@ -254,11 +254,25 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IsJoyconLeft() const {
|
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 {
|
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 {
|
std::string GetControllerName() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user