diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-03-31 22:10:54 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-03-31 22:20:42 +0200 |
commit | 5f8530060b0f55ceb29ec249356f40acd945f970 (patch) | |
tree | a32b1ecc7ccac4dd92d6d025f91261300fb9c54f /crawl-ref/source/libw32c.cc | |
parent | aa3932b2c466a0e0b99b3b823731558f8a0bb109 (diff) | |
download | crawl-ref-5f8530060b0f55ceb29ec249356f40acd945f970.tar.gz crawl-ref-5f8530060b0f55ceb29ec249356f40acd945f970.zip |
Unbreak arrow keys on win32 console.
Diffstat (limited to 'crawl-ref/source/libw32c.cc')
-rw-r--r-- | crawl-ref/source/libw32c.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc index b377178d36..a83f4f6b74 100644 --- a/crawl-ref/source/libw32c.cc +++ b/crawl-ref/source/libw32c.cc @@ -641,7 +641,7 @@ static int key_to_command(int keyin) return keyin; } -int vk_translate(WORD VirtCode, WCHAR c, DWORD cKeys) +static int vk_translate(WORD VirtCode, WCHAR c, DWORD cKeys) { bool shftDown = false; bool ctrlDown = false; @@ -786,9 +786,9 @@ int getch_ck(void) if (kr->bKeyDown) { key = vk_translate(kr->wVirtualKeyCode, - kr->uChar.UnicodeChar, - kr->dwControlKeyState); - if (key > 0) + kr->uChar.UnicodeChar, + kr->dwControlKeyState); + if (key != 0) { repeat_count = kr->wRepeatCount - 1; repeat_key = key; |