diff options
Diffstat (limited to 'engines/cine/various.cpp')
-rw-r--r-- | engines/cine/various.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index c9bb672e21..e17f68b36b 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -3204,7 +3204,7 @@ bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxL ch[1] = 0; manageEvents(); - int ascii = getKeyData(); + int keycode = getKeyData(); uint16 mouseButton, mouseX, mouseY; getMouseData(0, &mouseButton, &mouseX, &mouseY); @@ -3214,14 +3214,14 @@ bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxL else if (mouseButton & 1) quit = 1; - switch (ascii) { - case 8: // backspace + switch (keycode) { + case Common::KEYCODE_BACKSPACE: if (inputPos <= 1) { break; } inputPos--; redraw = true; - case 127: // del + case Common::KEYCODE_DELETE: if (inputPos <= inputLength) { if (inputPos != 1) { strncpy(tempString, inputString, inputPos - 1); @@ -3234,25 +3234,25 @@ bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxL redraw = true; } break; - case 276: // left + case Common::KEYCODE_LEFT: if (inputPos > 1) { inputPos--; redraw = true; } break; - case 275: // right + case Common::KEYCODE_RIGHT: if (inputPos <= inputLength) { inputPos++; redraw = true; } break; default: - if (((ascii >= 'a') && (ascii <='z')) || - ((ascii >= '0') && (ascii <='9')) || - ((ascii >= 'A') && (ascii <='Z')) || - (ascii == ' ')) { + if (((keycode >= 'a') && (keycode <='z')) || + ((keycode >= '0') && (keycode <='9')) || + ((keycode >= 'A') && (keycode <='Z')) || + (keycode == ' ')) { if (inputLength < stringMaxLength - 1) { - ch[0] = ascii; + ch[0] = keycode; if (inputPos != 1) { strncpy(tempString, inputString, inputPos - 1); strcat(tempString, ch); |