Loading libs/input/InputDevice.cpp +4 −10 Original line number Diff line number Diff line Loading @@ -46,15 +46,9 @@ static bool isValidNameChar(char ch) { static void appendInputDeviceConfigurationFileRelativePath(std::string& path, const std::string& name, InputDeviceConfigurationFileType type) { path.append(CONFIGURATION_FILE_DIR[type]); for (size_t i = 0; i < name.length(); i++) { char ch = name[i]; if (!isValidNameChar(ch)) { ch = '_'; } path.append(&ch, 1); } path.append(CONFIGURATION_FILE_EXTENSION[type]); path += CONFIGURATION_FILE_DIR[type]; path += name; path += CONFIGURATION_FILE_EXTENSION[type]; } std::string getInputDeviceConfigurationFilePathByDeviceIdentifier( Loading Loading @@ -84,7 +78,7 @@ std::string getInputDeviceConfigurationFilePathByDeviceIdentifier( } // Try device name. return getInputDeviceConfigurationFilePathByName(deviceIdentifier.name, type); return getInputDeviceConfigurationFilePathByName(deviceIdentifier.getCanonicalName(), type); } std::string getInputDeviceConfigurationFilePathByName( Loading Loading
libs/input/InputDevice.cpp +4 −10 Original line number Diff line number Diff line Loading @@ -46,15 +46,9 @@ static bool isValidNameChar(char ch) { static void appendInputDeviceConfigurationFileRelativePath(std::string& path, const std::string& name, InputDeviceConfigurationFileType type) { path.append(CONFIGURATION_FILE_DIR[type]); for (size_t i = 0; i < name.length(); i++) { char ch = name[i]; if (!isValidNameChar(ch)) { ch = '_'; } path.append(&ch, 1); } path.append(CONFIGURATION_FILE_EXTENSION[type]); path += CONFIGURATION_FILE_DIR[type]; path += name; path += CONFIGURATION_FILE_EXTENSION[type]; } std::string getInputDeviceConfigurationFilePathByDeviceIdentifier( Loading Loading @@ -84,7 +78,7 @@ std::string getInputDeviceConfigurationFilePathByDeviceIdentifier( } // Try device name. return getInputDeviceConfigurationFilePathByName(deviceIdentifier.name, type); return getInputDeviceConfigurationFilePathByName(deviceIdentifier.getCanonicalName(), type); } std::string getInputDeviceConfigurationFilePathByName( Loading