Fix how scancodes are read for text input

May fix issue where spanish keyboards are unable to press enter to chat
This commit is contained in:
MysterD 2020-10-11 17:20:43 -07:00
parent feb9bead02
commit adb7fe86eb

View file

@ -93,7 +93,7 @@ bool keyboard_on_key_down(int scancode) {
#endif #endif
if (sInTextInput) { if (sInTextInput) {
// perform text-input-specific actions // perform text-input-specific actions
switch (scancode) { switch (scancode & 0xFF) {
case SCANCODE_BACKSPACE: case SCANCODE_BACKSPACE:
gTextInput[max(strlen(gTextInput) - 1, 0)] = '\0'; gTextInput[max(strlen(gTextInput) - 1, 0)] = '\0';
break; break;