mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 17:58:53 +01:00
Added support for , and . as input keys.
This commit is contained in:
parent
48a7e99784
commit
52b5a2fc46
@ -121,8 +121,6 @@ bool UserInput::MapKey(std::string keyDescription, KeyCode_E key, bool required)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
description = Utils::replace(description, ".", "");
|
|
||||||
|
|
||||||
std::istringstream ss(description);
|
std::istringstream ss(description);
|
||||||
std::string token;
|
std::string token;
|
||||||
|
|
||||||
@ -131,6 +129,8 @@ bool UserInput::MapKey(std::string keyDescription, KeyCode_E key, bool required)
|
|||||||
while (std::getline(ss, token, ','))
|
while (std::getline(ss, token, ','))
|
||||||
{
|
{
|
||||||
token = Configuration::trimEnds(token);
|
token = Configuration::trimEnds(token);
|
||||||
|
if (token == "" && description != "") // Allow "," as input key
|
||||||
|
token = ",";
|
||||||
scanCode = SDL_GetScancodeFromName(token.c_str());
|
scanCode = SDL_GetScancodeFromName(token.c_str());
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user