From 52b5a2fc4670d6bc8d57e4b3de9fc82722987f09 Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Sun, 23 Apr 2017 08:47:54 +0200 Subject: [PATCH] Added support for , and . as input keys. --- RetroFE/Source/Control/UserInput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RetroFE/Source/Control/UserInput.cpp b/RetroFE/Source/Control/UserInput.cpp index 6d409af..0919247 100644 --- a/RetroFE/Source/Control/UserInput.cpp +++ b/RetroFE/Source/Control/UserInput.cpp @@ -121,8 +121,6 @@ bool UserInput::MapKey(std::string keyDescription, KeyCode_E key, bool required) return false; } - description = Utils::replace(description, ".", ""); - std::istringstream ss(description); std::string token; @@ -131,6 +129,8 @@ bool UserInput::MapKey(std::string keyDescription, KeyCode_E key, bool required) while (std::getline(ss, token, ',')) { token = Configuration::trimEnds(token); + if (token == "" && description != "") // Allow "," as input key + token = ","; scanCode = SDL_GetScancodeFromName(token.c_str()); bool found = false;