[Scummvm-cvs-logs] SF.net SVN: scummvm:[42007] scummvm/trunk/backends/platform/symbian/src
anotherguest at users.sourceforge.net
anotherguest at users.sourceforge.net
Wed Jul 1 22:02:33 CEST 2009
Revision: 42007
http://scummvm.svn.sourceforge.net/scummvm/?rev=42007&view=rev
Author: anotherguest
Date: 2009-07-01 20:02:33 +0000 (Wed, 01 Jul 2009)
Log Message:
-----------
Move action inits to engineInit and engineDone callbacks.
Modified Paths:
--------------
scummvm/trunk/backends/platform/symbian/src/SymbianActions.cpp
scummvm/trunk/backends/platform/symbian/src/SymbianOS.cpp
scummvm/trunk/backends/platform/symbian/src/SymbianOS.h
Modified: scummvm/trunk/backends/platform/symbian/src/SymbianActions.cpp
===================================================================
--- scummvm/trunk/backends/platform/symbian/src/SymbianActions.cpp 2009-07-01 18:57:39 UTC (rev 42006)
+++ scummvm/trunk/backends/platform/symbian/src/SymbianActions.cpp 2009-07-01 20:02:33 UTC (rev 42007)
@@ -102,8 +102,15 @@
}
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;
Modified: scummvm/trunk/backends/platform/symbian/src/SymbianOS.cpp
===================================================================
--- scummvm/trunk/backends/platform/symbian/src/SymbianOS.cpp 2009-07-01 18:57:39 UTC (rev 42006)
+++ scummvm/trunk/backends/platform/symbian/src/SymbianOS.cpp 2009-07-01 20:02:33 UTC (rev 42007)
@@ -471,10 +471,18 @@
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() {
if (ConfMan.get("gameid").empty() || GUI::Actions::Instance()->initialized())
return;
Modified: scummvm/trunk/backends/platform/symbian/src/SymbianOS.h
===================================================================
--- scummvm/trunk/backends/platform/symbian/src/SymbianOS.h 2009-07-01 18:57:39 UTC (rev 42006)
+++ scummvm/trunk/backends/platform/symbian/src/SymbianOS.h 2009-07-01 20:02:33 UTC (rev 42007)
@@ -107,6 +107,18 @@
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
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list