diff options
author | Fabio Battaglia | 2010-02-21 14:34:22 +0000 |
---|---|---|
committer | Fabio Battaglia | 2010-02-21 14:34:22 +0000 |
commit | 52f66d54ccdf32428d7e1b577354c530ba8907a3 (patch) | |
tree | fdd26e1dec66ec4d2e0587e21cd41f81457ac74a /backends/platform | |
parent | 6af6d66e2b152e8c84936f0116d2e66ef662cf6c (diff) | |
download | scummvm-rg350-52f66d54ccdf32428d7e1b577354c530ba8907a3.tar.gz scummvm-rg350-52f66d54ccdf32428d7e1b577354c530ba8907a3.tar.bz2 scummvm-rg350-52f66d54ccdf32428d7e1b577354c530ba8907a3.zip |
N64: send ascii code for numpad keys
svn-id: r48105
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/n64/osys_n64_events.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/backends/platform/n64/osys_n64_events.cpp b/backends/platform/n64/osys_n64_events.cpp index 0872068b7c..9ea439dc4b 100644 --- a/backends/platform/n64/osys_n64_events.cpp +++ b/backends/platform/n64/osys_n64_events.cpp @@ -275,6 +275,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!(cur_CU && cur_CL)) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP7; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -283,6 +284,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!(cur_CU && cur_CR)) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP9; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -291,6 +293,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!(cur_CD && cur_CL)) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP1; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -299,6 +302,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!(cur_CD && cur_CR)) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP3; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -307,6 +311,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!cur_CL) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP4; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -315,6 +320,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!cur_CR) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP6; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -323,6 +329,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!cur_CU) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP8; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -331,6 +338,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) { if (!cur_CD) { buttonPressed = true; event.kbd.keycode = Common::KEYCODE_KP2; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; event.type = Common::EVENT_KEYUP; lastKPad = 0; } @@ -340,41 +348,49 @@ bool OSystem_N64::pollEvent(Common::Event &event) { buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP7; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 7; } else if (cur_CU && cur_CR) { // UP - RIGHT buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP9; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 9; } else if (cur_CD && cur_CL) { // DOWN - LEFT buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP1; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 1; } else if (cur_CD && cur_CR) { // DOWN - RIGHT buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP3; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 3; } else if (cur_CL) { // LEFT buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP4; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 4; } else if (cur_CR) { // RIGHT buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP6; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 6; } else if (cur_CU) { // UP buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP8; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 8; } else if (cur_CD) { // DOWN buttonPressed = true; event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_KP2; + event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0'; lastKPad = 2; } break; |