summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-10-17 10:08:55 +0200
committerGitHub <noreply@github.com>2016-10-17 10:08:55 +0200
commitdccbd4aa6b9914fd275901537a3fc8e9e827ea7d (patch)
treed01c6b0117810004caaafb6960a3afa0d987d44a
parent1da55f425129909ae20a15c64cf22a49ecab8227 (diff)
parentfa502b7ccc1859b7d75dac841036eda6bff5210d (diff)
Merge pull request #6832 from Hinsbart/mapping_whitespace
Allow whitespace in Gamepad mappings.
-rw-r--r--main/input_default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 92f4a6fb72..c60fcd2243 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -1050,8 +1050,8 @@ void InputDefault::parse_mapping(String p_mapping) {
if (entry[idx] == "")
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);
if (to_event.type == -1)