ControllerInterface/Android: Implement sensor input for InputDevices

This functionality was added in Android 12 to let apps get motion data
for gamepads.
This commit is contained in:
JosJuice committed 2023-03-03 22:28:23 +01:00
1 parent 5e51b56d72
commit 36acb17700
5 files changed
+118 -37

No files matched your search

@@ -242,6 +242,18 @@ std::shared_ptr<Device> DeviceContainer::FindDevice(const DeviceQualifier& devq)
return nullptr;
}
std::vector<std::shared_ptr<Device>> DeviceContainer::GetAllDevices() const
{
std::lock_guard lk(m_devices_mutex);
std::vector<std::shared_ptr<Device>> devices;
for (const auto& d : m_devices)
devices.emplace_back(d);
return devices;
}
std::vector<std::string> DeviceContainer::GetAllDeviceStrings() const
{
std::lock_guard lk(m_devices_mutex);