mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 12:13:40 +02:00
investigating xbox failure on restart (WIP)
This commit is contained in:
parent
30526374bc
commit
dd97f16728
1 changed files with 10 additions and 1 deletions
|
@ -77,7 +77,7 @@ void UserInputMapper::registerDevice(InputDevice::Pointer device) {
|
|||
}
|
||||
const auto& deviceID = device->_deviceID;
|
||||
|
||||
recordDeviceOfType(device->getName());
|
||||
//recordDeviceOfType(device->getName());
|
||||
|
||||
qCDebug(controllers) << "Registered input device <" << device->getName() << "> deviceID = " << deviceID;
|
||||
|
||||
|
@ -134,6 +134,15 @@ void UserInputMapper::removeDevice(int deviceID) {
|
|||
_mappingsByDevice.erase(mappingsEntry);
|
||||
}
|
||||
|
||||
for (const auto& inputMapping : device->getAvailableInputs()) {
|
||||
const auto& input = inputMapping.first;
|
||||
auto endpoint = _endpointsByInput.find(input);
|
||||
if (endpoint != _endpointsByInput.end()) {
|
||||
_inputsByEndpoint.erase((*endpoint).second);
|
||||
_endpointsByInput.erase(input);
|
||||
}
|
||||
}
|
||||
|
||||
_registeredDevices.erase(proxyEntry);
|
||||
|
||||
emit hardwareChanged();
|
||||
|
|
Loading…
Reference in a new issue