fix findDevice

This commit is contained in:
Sam Gondelman 2015-06-17 14:42:11 -07:00
parent a37b089b33
commit 0157997126
2 changed files with 2 additions and 2 deletions

View file

@ -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) :

View file

@ -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;
}
}