summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-08-05 20:36:36 +0000
committermichi_cc <michi_cc@openttd.org>2013-08-05 20:36:36 +0000
commit019984a14f01e4463ae479765d2340ff26055367 (patch)
tree291b47c56523ebef7368f3588e921a1cdb78f331 /src/window.cpp
parent270d8aa639341f8be7fde9aa6e6f5bb6fa894d4f (diff)
downloadopenttd-019984a14f01e4463ae479765d2340ff26055367.tar.xz
(svn r25671) -Codechange: Pass character and key code separately to the keyboard handler.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/window.cpp b/src/window.cpp
index bf51fd7ad..93a84812c 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2448,18 +2448,15 @@ EventState Window::HandleEditBoxKey(int wid, WChar key, uint16 keycode)
/**
* Handle keyboard input.
- * @param raw_key Lower 8 bits contain the ASCII character, the higher 16 bits the keycode
+ * @param keycode Virtual keycode of the key.
+ * @param key Unicode character of the key.
*/
-void HandleKeypress(uint32 raw_key)
+void HandleKeypress(uint keycode, WChar key)
{
/* World generation is multithreaded and messes with companies.
* But there is no company related window open anyway, so _current_company is not used. */
assert(HasModalProgress() || IsLocalCompany());
- /* Setup event */
- uint16 key = GB(raw_key, 0, 16);
- uint16 keycode = GB(raw_key, 16, 16);
-
/*
* The Unicode standard defines an area called the private use area. Code points in this
* area are reserved for private use and thus not portable between systems. For instance,