mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-19 13:18:51 +01:00
Fix issue where letterUp and letterDown are not specified in controls.conf.
This commit is contained in:
parent
24db185788
commit
cacbf1265e
@ -51,8 +51,8 @@ bool UserInput::Initialize()
|
||||
retVal = MapKey("pageDown", KeyCodePageDown) && retVal;
|
||||
retVal = MapKey("pageUp", KeyCodePageUp) && retVal;
|
||||
retVal = MapKey("letterDown", KeyCodeLetterDown) && retVal;
|
||||
retVal = MapKey("letterUp", KeyCodeLetterUp) && retVal;
|
||||
retVal = MapKey("select", KeyCodeSelect) && retVal;
|
||||
MapKey("letterUp", KeyCodeLetterUp);
|
||||
MapKey("select", KeyCodeSelect);
|
||||
retVal = MapKey("back", KeyCodeBack) && retVal;
|
||||
retVal = MapKey("quit", KeyCodeQuit) && retVal;
|
||||
// these features will need to be implemented at a later time
|
||||
@ -130,10 +130,8 @@ bool UserInput::SetKeyState(SDL_Scancode code, bool state)
|
||||
{
|
||||
KeyCode_E key = GetKeycode(code);
|
||||
|
||||
if(key == KeyCodeNull)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(key == KeyCodeNull) { return false; }
|
||||
if(KeyState.find(key) == KeyState.end()) { return false; }
|
||||
|
||||
KeyState[key] = state;
|
||||
return true;
|
||||
@ -141,6 +139,7 @@ bool UserInput::SetKeyState(SDL_Scancode code, bool state)
|
||||
}
|
||||
bool UserInput::GetKeyState(KeyCode_E key)
|
||||
{
|
||||
if(KeyState.find(key) == KeyState.end()) { return false; }
|
||||
return KeyState[key];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user