remove a few if's to make the ugly fix a little less ugly; they only save
a few CPU cycles but are really redundant
This commit is contained in:
parent
e97c053cdd
commit
f93bb8eedc
1 changed files with 1 additions and 7 deletions
|
@ -265,19 +265,13 @@ FGInput::doKey (int k, int modifiers, int x, int y)
|
|||
b.last_state = 0;
|
||||
} else {
|
||||
if (k >= 1 && k <= 26) {
|
||||
if (_key_bindings[k + '@'].last_state)
|
||||
doKey(k + '@', KEYMOD_RELEASED, x, y);
|
||||
if (_key_bindings[k + '`'].last_state)
|
||||
doKey(k + '`', KEYMOD_RELEASED, x, y);
|
||||
} else if (k >= 'A' && k <= 'Z') {
|
||||
if (_key_bindings[k - '@'].last_state)
|
||||
doKey(k - '@', KEYMOD_RELEASED, x, y);
|
||||
if (_key_bindings[tolower(k)].last_state)
|
||||
doKey(tolower(k), KEYMOD_RELEASED, x, y);
|
||||
doKey(tolower(k), KEYMOD_RELEASED, x, y);
|
||||
} else if (k >= 'a' && k <= 'z') {
|
||||
if (_key_bindings[k - '`'].last_state)
|
||||
doKey(k - '`', KEYMOD_RELEASED, x, y);
|
||||
if (_key_bindings[toupper(k)].last_state)
|
||||
doKey(toupper(k), KEYMOD_RELEASED, x, y);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue