mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
WiimoteReal: Add function to test specifically for a wii remote name.
This commit is contained in:
parent
8323c21e40
commit
94ecf4df39
@ -965,13 +965,17 @@ void Refresh()
|
||||
s_wiimote_scanner.SetScanMode(WiimoteScanMode::SCAN_ONCE);
|
||||
}
|
||||
|
||||
bool IsValidDeviceName(const std::string& name)
|
||||
bool IsValidDeviceName(std::string_view name)
|
||||
{
|
||||
return "Nintendo RVL-CNT-01" == name || "Nintendo RVL-CNT-01-TR" == name ||
|
||||
IsBalanceBoardName(name);
|
||||
return IsWiimoteName(name) || IsBalanceBoardName(name);
|
||||
}
|
||||
|
||||
bool IsBalanceBoardName(const std::string& name)
|
||||
bool IsWiimoteName(std::string_view name)
|
||||
{
|
||||
return name == "Nintendo RVL-CNT-01" || name == "Nintendo RVL-CNT-01-TR";
|
||||
}
|
||||
|
||||
bool IsBalanceBoardName(std::string_view name)
|
||||
{
|
||||
return "Nintendo RVL-WBC-01" == name;
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
@ -225,8 +226,10 @@ extern std::unique_ptr<Wiimote> g_wiimotes[MAX_BBMOTES];
|
||||
|
||||
void AddWiimoteToPool(std::unique_ptr<Wiimote>);
|
||||
|
||||
bool IsValidDeviceName(const std::string& name);
|
||||
bool IsBalanceBoardName(const std::string& name);
|
||||
bool IsValidDeviceName(std::string_view name);
|
||||
bool IsWiimoteName(std::string_view name);
|
||||
bool IsBalanceBoardName(std::string_view name);
|
||||
|
||||
bool IsNewWiimote(const std::string& identifier);
|
||||
|
||||
bool IsKnownDeviceId(const USBUtils::DeviceInfo&);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user