Merge pull request #14012 from jordan-woyak/wmreal-name-check

WiimoteReal: Check just the start of Bluetooth device names to match the test performed by Wii software.
This commit is contained in:
JMC47 2025-10-17 18:46:42 -04:00 committed by GitHub
commit 0755218617
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1028,12 +1028,14 @@ bool IsValidDeviceName(std::string_view name)
bool IsWiimoteName(std::string_view name)
{
return name == "Nintendo RVL-CNT-01" || name == "Nintendo RVL-CNT-01-TR";
// Wii software similarly checks just the start of the name.
return name.starts_with("Nintendo RVL-CNT");
}
bool IsBalanceBoardName(std::string_view name)
{
return "Nintendo RVL-WBC-01" == name;
// Wii software similarly checks just the start of the name.
return name.starts_with("Nintendo RVL-WBC");
}
// This is called from the scanner backends (currently on the scanner thread).