diff options
author | Eugene Sandulenko | 2009-05-12 19:03:42 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-05-12 19:03:42 +0000 |
commit | a0a44ef498a6ee53d67805362ec520ff5ad2dfea (patch) | |
tree | 1268a6df6381047818080641db1ed87e5033a577 /common/keyboard.h | |
parent | ef1a8c8677f4e6803926bd5db32110925aa38901 (diff) | |
download | scummvm-rg350-a0a44ef498a6ee53d67805362ec520ff5ad2dfea.tar.gz scummvm-rg350-a0a44ef498a6ee53d67805362ec520ff5ad2dfea.tar.bz2 scummvm-rg350-a0a44ef498a6ee53d67805362ec520ff5ad2dfea.zip |
Allow creation of KeyState with zero ascii value.
svn-id: r40501
Diffstat (limited to 'common/keyboard.h')
-rw-r--r-- | common/keyboard.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/keyboard.h b/common/keyboard.h index 6a4445728f..cf595d4dd8 100644 --- a/common/keyboard.h +++ b/common/keyboard.h @@ -249,9 +249,15 @@ struct KeyState { */ byte flags; - KeyState(KeyCode kc = KEYCODE_INVALID, uint16 asc = 0, byte f = 0) { + KeyState(KeyCode kc = KEYCODE_INVALID) { keycode = kc; - ascii = asc ? asc : (uint16)kc; + ascii = (uint16)kc; + flags = 0; + } + + KeyState(KeyCode kc, uint16 asc, byte f = 0) { + keycode = kc; + ascii = asc; flags = f; } |