mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
fix findDevice
This commit is contained in:
parent
a37b089b33
commit
0157997126
2 changed files with 2 additions and 2 deletions
|
@ -462,7 +462,7 @@ void ControllerScriptingInterface::resetDevice(unsigned int device) {
|
|||
}
|
||||
|
||||
int ControllerScriptingInterface::findDevice(QString name) {
|
||||
Application::getUserInputMapper()->findDevice(name);
|
||||
return Application::getUserInputMapper()->findDevice(name);
|
||||
}
|
||||
|
||||
InputController::InputController(int deviceTrackerId, int subTrackerId, QObject* parent) :
|
||||
|
|
|
@ -50,7 +50,7 @@ void UserInputMapper::resetDevice(uint16 deviceID) {
|
|||
|
||||
int UserInputMapper::findDevice(QString name) {
|
||||
for (auto device : _registeredDevices) {
|
||||
if (device.second->_name == name) {
|
||||
if (device.second->_name.split(" (")[0] == name) {
|
||||
return device.first;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue