(svn r25671) -Codechange: Pass character and key code separately to the keyboard handler.

This commit is contained in:
michi_cc
2013-08-05 20:36:36 +00:00
parent d5590fa8f2
commit be50bc410f
6 changed files with 25 additions and 20 deletions

View File

@@ -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,