mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ControllerInterface/Win32: Prevent devcies from losing their "id" on a hotplug event.
This commit is contained in:
@ -194,6 +194,11 @@ void Device::UpdateMotors()
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<int> Device::GetPreferredId() const
|
||||
{
|
||||
return m_index;
|
||||
}
|
||||
|
||||
// GET name/source/id
|
||||
|
||||
std::string Device::Button::GetName() const
|
||||
|
@ -92,8 +92,9 @@ public:
|
||||
|
||||
Device(const XINPUT_CAPABILITIES& capabilities, u8 index);
|
||||
|
||||
std::string GetName() const override;
|
||||
std::string GetSource() const override;
|
||||
std::string GetName() const final override;
|
||||
std::string GetSource() const final override;
|
||||
std::optional<int> GetPreferredId() const final override;
|
||||
|
||||
void UpdateMotors();
|
||||
|
||||
@ -104,5 +105,5 @@ private:
|
||||
const BYTE m_subtype;
|
||||
const u8 m_index;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace XInput
|
||||
} // namespace ciface
|
||||
|
Reference in New Issue
Block a user