mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 06:18:32 +00:00
analytics: Collect less data about controllers.
The name field can contain personal information, particularly in the case of bluetooth devices on OSX which get configured with the user's full name.
This commit is contained in:
parent
ce4e6804a5
commit
2ec3a24e4e
3 changed files with 18 additions and 5 deletions
|
@ -117,3 +117,17 @@ bool InputConfig::ControllersNeedToBeCreated() const
|
|||
{
|
||||
return m_controllers.empty();
|
||||
}
|
||||
|
||||
bool InputConfig::IsControllerControlledByGamepadDevice(int index) const
|
||||
{
|
||||
if (static_cast<size_t>(index) >= m_controllers.size())
|
||||
return false;
|
||||
|
||||
const auto& controller = m_controllers.at(index).get()->default_device;
|
||||
|
||||
// Filter out anything which obviously not a gamepad
|
||||
return !((controller.source == "Keyboard") // OSX Keyboard/Mouse
|
||||
|| (controller.source == "XInput2") // Linux and BSD Keyboard/Mouse
|
||||
|| (controller.source == "Android" && controller.name == "Touchscreen") // Android Touchscreen
|
||||
|| (controller.source == "DInput" && controller.name == "Keyboard Mouse")); // Windows Keyboard/Mouse
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue