Browse Source

Merge pull request #6832 from Hinsbart/mapping_whitespace

Allow whitespace in Gamepad mappings.
Rémi Verschelde 9 years ago
parent
commit
dccbd4aa6b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      main/input_default.cpp

+ 2 - 2
main/input_default.cpp

@@ -1050,8 +1050,8 @@ void InputDefault::parse_mapping(String p_mapping) {
 		if (entry[idx] == "")
 		if (entry[idx] == "")
 			continue;
 			continue;
 
 
-		String from = entry[idx].get_slice(":", 1);
-		String to = entry[idx].get_slice(":", 0);
+		String from = entry[idx].get_slice(":", 1).replace(" ", "");
+		String to = entry[idx].get_slice(":", 0).replace(" ", "");
 
 
 		JoyEvent to_event = _find_to_event(to);
 		JoyEvent to_event = _find_to_event(to);
 		if (to_event.type == -1)
 		if (to_event.type == -1)