1
0
Fork 0

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:
mfranz 2005-11-23 12:28:27 +00:00
parent e97c053cdd
commit f93bb8eedc

View file

@ -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);
}
}