diff options
author | Filippos Karapetis | 2009-02-25 19:52:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-02-25 19:52:17 +0000 |
commit | 71ae2d3aba4a47a3fecf2cea02528ec2763ee6fc (patch) | |
tree | bc4352b722674d261ce8059a72164a343eff3d2e /engines/sci/gfx/gfx_driver.cpp | |
parent | c199c6c6c4652306c4660e4736f054175e4f0b25 (diff) | |
download | scummvm-rg350-71ae2d3aba4a47a3fecf2cea02528ec2763ee6fc.tar.gz scummvm-rg350-71ae2d3aba4a47a3fecf2cea02528ec2763ee6fc.tar.bz2 scummvm-rg350-71ae2d3aba4a47a3fecf2cea02528ec2763ee6fc.zip |
Reverted my wrong commit #38870. Most of the key codes are handled by the engine itself, however there are cases where they are handled by the game scripts, e.g. in save/load dialogs. The arrow keys in the save/load dialogs should work properly again. The numpad keys still look to be broken by some other commit
svn-id: r38886
Diffstat (limited to 'engines/sci/gfx/gfx_driver.cpp')
-rw-r--r-- | engines/sci/gfx/gfx_driver.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index e9b1036d79..28c16ee820 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -375,11 +375,11 @@ static sci_event_t scummvm_get_event(gfx_driver_t *drv) { if (input.data == Common::KEYCODE_TAB) { // Tab input.type = SCI_EVT_KEYBOARD; - input.data = Common::KEYCODE_TAB; + input.data = SCI_K_TAB; if (input.buckybits & (SCI_EVM_LSHIFT | SCI_EVM_RSHIFT)) input.character = SCI_K_SHIFT_TAB; else - input.character = Common::KEYCODE_TAB; + input.character = SCI_K_TAB; } } else if ((input.data >= Common::KEYCODE_F1) && input.data <= Common::KEYCODE_F10) { // F1-F10 @@ -396,16 +396,34 @@ static sci_event_t scummvm_get_event(gfx_driver_t *drv) { input.type = SCI_EVT_KEYBOARD; switch (ev.kbd.keycode) { case Common::KEYCODE_UP: + input.data = SCI_K_UP; + break; case Common::KEYCODE_DOWN: + input.data = SCI_K_DOWN; + break; case Common::KEYCODE_RIGHT: + input.data = SCI_K_RIGHT; + break; case Common::KEYCODE_LEFT: + input.data = SCI_K_LEFT; + break; case Common::KEYCODE_INSERT: + input.data = SCI_K_INSERT; + break; case Common::KEYCODE_HOME: + input.data = SCI_K_HOME; + break; case Common::KEYCODE_END: + input.data = SCI_K_END; + break; case Common::KEYCODE_PAGEUP: + input.data = SCI_K_PGUP; + break; case Common::KEYCODE_PAGEDOWN: + input.data = SCI_K_PGDOWN; + break; case Common::KEYCODE_DELETE: - input.data = ev.kbd.keycode; + input.data = SCI_K_DELETE; break; //TODO: SCI_K_CENTER default: |