aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Persson2009-07-01 20:02:33 +0000
committerLars Persson2009-07-01 20:02:33 +0000
commit4b850a2c0357aa2d94cfc2fcf5d05ed0903278e5 (patch)
tree98a144a9f6b8d1d1b4cbc9e0c5ce5f0ae551dc2a
parentf9298ff40310149779b37ccdecc873afba7adf2f (diff)
downloadscummvm-rg350-4b850a2c0357aa2d94cfc2fcf5d05ed0903278e5.tar.gz
scummvm-rg350-4b850a2c0357aa2d94cfc2fcf5d05ed0903278e5.tar.bz2
scummvm-rg350-4b850a2c0357aa2d94cfc2fcf5d05ed0903278e5.zip
Move action inits to engineInit and engineDone callbacks.
svn-id: r42007
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp7
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp10
-rw-r--r--backends/platform/symbian/src/SymbianOS.h12
3 files changed, 28 insertions, 1 deletions
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index c45cef32bd..995b03f200 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -102,8 +102,15 @@ SymbianActions::SymbianActions()
}
void SymbianActions::initInstanceMain(OSystem *mainSystem) {
+ int i;
+
Actions::initInstanceMain(mainSystem);
+ // Disable all mappings before setting main mappings again
+ for (i = 0; i < ACTION_LAST; i++) {
+ _action_enabled[i] = false;
+ }
+
// Mouse Up
_action_enabled[ACTION_UP] = true;
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 6a8a46df07..7af1cade8c 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -471,8 +471,16 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
void OSystem_SDL_Symbian::setWindowCaption(const char *caption) {
OSystem_SDL::setWindowCaption(caption);
+}
+
+void OSystem_SDL_Symbian::engineInit() {
+ // Check mappings for the engine just started
check_mappings();
-FIXME: move check_mappings() call to engineInit() & engineDone()
+}
+
+void OSystem_SDL_Symbian::engineDone() {
+ // Need to reset engine to basic state after an engine has been running
+ GUI::Actions::Instance()->initInstanceMain(this);
}
void OSystem_SDL_Symbian::check_mappings() {
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index efca94b706..b873b503be 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -107,6 +107,18 @@ protected:
void setWindowCaption(const char *caption);
+ /**
+ * Allows the backend to perform engine specific init.
+ * Called just before the engine is run.
+ */
+ virtual void engineInit();
+
+ /**
+ * Allows the backend to perform engine specific de-init.
+ * Called after the engine finishes.
+ */
+ virtual void engineDone();
+
//
// Used to intialized special game mappings
//