mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02: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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user