From a3e8f765a6be500357b99d693b21266dbc428137 Mon Sep 17 00:00:00 2001 From: Lars Persson Date: Fri, 8 Jun 2007 18:09:24 +0000 Subject: Updated Symbian OS Prediction handling Updated AGI to only enable predictive input after dictionary was found. svn-id: r27206 --- backends/platform/symbian/src/SymbianOS.cpp | 19 +++++++++++++------ engines/agi/predictive.cpp | 6 +++--- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 80f9491d2a..d5c869ac91 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -88,8 +88,10 @@ void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) { else { } - - return; + break; + case kFeatureDisableKeyFiltering: + GUI::Actions::Instance()->beginMapping(enable); + break;; default: OSystem_SDL::setFeatureState(f, enable); } @@ -345,16 +347,21 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) { } return true; - + case GUI::ACTION_MULTI: { + GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); + // if key code is pause, then change event to interactive or just fall through + if(key.keycode() == SDLK_PAUSE) { + event.type = Common::EVENT_PREDICTIVE_DIALOG; + return true; + } + } case GUI::ACTION_SAVE: case GUI::ACTION_SKIP: - case GUI::ACTION_MULTI: case GUI::ACTION_SKIP_TEXT: case GUI::ACTION_PAUSE: case GUI::ACTION_SWAPCHAR: case GUI::ACTION_FASTMODE: - case GUI::ACTION_DEBUGGER: - { + case GUI::ACTION_DEBUGGER: { GUI::Key &key = GUI::Actions::Instance()->getKeyAction(loop); ev.key.keysym.sym = (SDLKey) key.ascii(); ev.key.keysym.scancode= key.keycode(); diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp index 5bc70ef072..605f135f67 100644 --- a/engines/agi/predictive.cpp +++ b/engines/agi/predictive.cpp @@ -121,9 +121,6 @@ bool AgiEngine::predictiveDialog(void) { bool navigationwithkeys = false; bool processkey; - _predictiveDialogRunning = true; - _system->setFeatureState(OSystem::kFeatureDisableKeyFiltering, true); - // FIXME: Move this to a more appropriate place. initAsciiToNumTable(); @@ -153,6 +150,9 @@ bool AgiEngine::predictiveDialog(void) { if (!_searchTreeRoot) return false; } + + _predictiveDialogRunning = true; + _system->setFeatureState(OSystem::kFeatureDisableKeyFiltering, true); memset(repeatcount, 0, MAXWORDLEN); -- cgit v1.2.3