Linux: Allow connecting Wiimotes via L2CAP (#1353)

This commit is contained in:
capitalistspz 2024-12-07 11:02:40 +00:00 committed by GitHub
parent 934cb54605
commit dd0af0a56f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 532 additions and 221 deletions

View file

@ -47,8 +47,11 @@ std::vector<WiimoteDevicePtr> HidapiWiimote::get_devices() {
return wiimote_devices;
}
bool HidapiWiimote::operator==(WiimoteDevice& o) const {
return static_cast<HidapiWiimote const&>(o).m_path == m_path;
bool HidapiWiimote::operator==(const WiimoteDevice& rhs) const {
auto other = dynamic_cast<const HidapiWiimote*>(&rhs);
if (!other)
return false;
return m_path == other->m_path;
}
HidapiWiimote::~HidapiWiimote() {