summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/windowmanager-sdl.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-04-09 19:38:26 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-04-10 09:54:21 +0200
commit29bf59374290fe6612884d51b2e2b58498af43d3 (patch)
treed440fe076a3c83969d2f1257dac6411af561132c /crawl-ref/source/windowmanager-sdl.cc
parent4537a1d26c20805834e67fc912175a633b45b810 (diff)
downloadcrawl-ref-29bf59374290fe6612884d51b2e2b58498af43d3.tar.gz
crawl-ref-29bf59374290fe6612884d51b2e2b58498af43d3.zip
Non-BMP characters are not ASCII.
Diffstat (limited to 'crawl-ref/source/windowmanager-sdl.cc')
-rw-r--r--crawl-ref/source/windowmanager-sdl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/windowmanager-sdl.cc b/crawl-ref/source/windowmanager-sdl.cc
index 6cbd0306bf..e0728d8799 100644
--- a/crawl-ref/source/windowmanager-sdl.cc
+++ b/crawl-ref/source/windowmanager-sdl.cc
@@ -181,7 +181,7 @@ static int _translate_keysym(SDL_keysym &keysym)
// Alt does not get baked into keycodes like shift and ctrl, so handle it.
const int key_offset = (mod & MOD_ALT) ? -3000 : 0;
- const bool is_ascii = ((keysym.unicode & 0xFF80) == 0);
+ const bool is_ascii = keysym.unicode < 127;
return (is_ascii ? (keysym.unicode & 0x7F) + key_offset : keysym.unicode);
}