diff options
author | Lars Persson | 2007-03-14 19:25:33 +0000 |
---|---|---|
committer | Lars Persson | 2007-03-14 19:25:33 +0000 |
commit | 4d962e1771de512118cc994de02fcbee01b6bddd (patch) | |
tree | bfccd8c7ae3b80a8cfd5f1716cdf0f7df57e8050 /backends/platform/symbian/src/SymbianOS.cpp | |
parent | 7d599d3242f269b0a2f327fe44b555ce3742b2ec (diff) | |
download | scummvm-rg350-4d962e1771de512118cc994de02fcbee01b6bddd.tar.gz scummvm-rg350-4d962e1771de512118cc994de02fcbee01b6bddd.tar.bz2 scummvm-rg350-4d962e1771de512118cc994de02fcbee01b6bddd.zip |
Add new KeyMappings (Debugger & Fast mode) for Symbian OS.
svn-id: r26133
Diffstat (limited to 'backends/platform/symbian/src/SymbianOS.cpp')
-rw-r--r-- | backends/platform/symbian/src/SymbianOS.cpp | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index f1f26cb51b..71303ff3ce 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -79,6 +79,21 @@ bool OSystem_SDL_Symbian::hasFeature(Feature f) { } } +void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) { + switch(f) { + case kFeatureVirtualKeyboard: + if (enable) { + } + else { + + } + + return; + default: + OSystem_SDL::setFeatureState(f, enable); + } +} + OSystem_SDL_Symbian::zoneDesc OSystem_SDL_Symbian::_zones[TOTAL_ZONES] = { { 0, 0, 320, 145 }, { 0, 145, 150, 55 }, @@ -335,11 +350,30 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Event &event) { case GUI::ACTION_FT_CHEAT: case GUI::ACTION_SKIP_TEXT: case GUI::ACTION_PAUSE: + case GUI::ACTION_SWAPCHAR: + case GUI::ACTION_FASTMODE: + case GUI::ACTION_DEBUGGER: { GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); - ev.key.keysym.sym = (SDLKey)key.ascii(); + ev.key.keysym.sym = (SDLKey) key.ascii(); ev.key.keysym.scancode= key.keycode(); - ev.key.keysym.mod = (SDLMod)key.flags(); + ev.key.keysym.mod = (SDLMod) key.flags(); + + // Translate from SDL keymod event to Scummvm Key Mod Event. + // This codes is also present in GP32 backend and in SDL backend as a static function + // Perhaps it should be shared. + if(key.flags() != 0) { + event.kbd.flags = 0; + + if (ev.key.keysym.mod & KMOD_SHIFT) + event.kbd.flags |= OSystem::KBD_SHIFT; + + if (ev.key.keysym.mod & KMOD_ALT) + event.kbd.flags |= OSystem::KBD_ALT; + + if (ev.key.keysym.mod & KMOD_CTRL) + event.kbd.flags |= OSystem::KBD_CTRL; + } return false; } |