Fix incorrect handling of ALPHA for normal mode

This commit is contained in:
Lephenixnoir 2021-09-19 21:09:24 +02:00
parent 55ddde1849
commit 41d0b04a26
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 3 deletions

View File

@ -178,12 +178,13 @@ static int KeyDown(KeyboardState state, int key)
{
int code = DoomKeyToKeycode(key);
/* For alphanumeric keys, watch the status of ALPHA */
if(key >= -'9' && key <= -'0')
return KeycodeDown(state, code) && KeycodeDown(state, KEYCODE_ALPHA);
else if(code == KEYCODE_ALPHA)
return KeycodeDown(state, code);
else
else if((key >= 'A' && key <= 'Z') || key == -' ')
return KeycodeDown(state, code) && !KeycodeDown(state, KEYCODE_ALPHA);
else
return KeycodeDown(state, code);
}
void UpdateKeyboardState(void)