aboutsummaryrefslogtreecommitdiff
path: root/backends/symbian/src
diff options
context:
space:
mode:
authorLars Persson2006-04-21 21:15:05 +0000
committerLars Persson2006-04-21 21:15:05 +0000
commita3661c158af1e6a0cff79714db84f78b33428ca8 (patch)
treedfde3c4cc17b0882aeca47780a77de7d0e132903 /backends/symbian/src
parent5b776e3e2859ed24b3186af7bea1cec666a0910e (diff)
downloadscummvm-rg350-a3661c158af1e6a0cff79714db84f78b33428ca8.tar.gz
scummvm-rg350-a3661c158af1e6a0cff79714db84f78b33428ca8.tar.bz2
scummvm-rg350-a3661c158af1e6a0cff79714db84f78b33428ca8.zip
Updated Symbian Actions and SDL Symbian interface for latest backend changes so it all works properly again.
svn-id: r22076
Diffstat (limited to 'backends/symbian/src')
-rw-r--r--backends/symbian/src/SymbianActions.cpp8
-rw-r--r--backends/symbian/src/SymbianActions.h4
-rw-r--r--backends/symbian/src/SymbianOS.cpp21
-rw-r--r--backends/symbian/src/SymbianOS.h10
4 files changed, 26 insertions, 17 deletions
diff --git a/backends/symbian/src/SymbianActions.cpp b/backends/symbian/src/SymbianActions.cpp
index 4844bc27b2..e42f134ada 100644
--- a/backends/symbian/src/SymbianActions.cpp
+++ b/backends/symbian/src/SymbianActions.cpp
@@ -76,7 +76,7 @@ int SymbianActions::size() {
}
Common::String SymbianActions::domain() {
- return "symbian";
+ return Common::ConfigManager::kApplicationDomain;
}
int SymbianActions::version() {
@@ -121,10 +121,10 @@ void SymbianActions::initInstanceMain(OSystem *mainSystem) {
}
void SymbianActions::initInstanceGame() {
- String gameid(ConfMan.get("gameid"));
+ Common::String gameid(ConfMan.get("gameid"));
bool is_simon = (strncmp(gameid.c_str(), "simon", 5) == 0);
- bool is_sky = (gameid == "sky");
- bool is_queen = (gameid == "queen");
+ bool is_sky = (strncmp(gameid.c_str(), "sky", 3) == 0);
+ bool is_queen = (strncmp(gameid.c_str(), "queen", 5) == 0);
bool is_gob = (strncmp(gameid.c_str(), "gob", 3) == 0);
bool is_ite = ((strncmp(gameid.c_str(), "ite", 3) == 0) ||
(strncmp(gameid.c_str(), "ihnm", 4) == 0));
diff --git a/backends/symbian/src/SymbianActions.h b/backends/symbian/src/SymbianActions.h
index f8e82afcb0..5f435d5912 100644
--- a/backends/symbian/src/SymbianActions.h
+++ b/backends/symbian/src/SymbianActions.h
@@ -57,7 +57,7 @@ public:
bool perform(ActionType action, bool pushed = true);
Common::String actionName(ActionType action);
int size();
- static void init(const Common::String &gameid);
+ static void init();
void initInstanceMain(OSystem *mainSystem);
void initInstanceGame();
@@ -68,7 +68,7 @@ public:
~SymbianActions();
private:
- SymbianActions(const Common::String &gameid);
+ SymbianActions();
bool _right_click_needed;
};
diff --git a/backends/symbian/src/SymbianOS.cpp b/backends/symbian/src/SymbianOS.cpp
index 13dac270fd..1bf08aa10b 100644
--- a/backends/symbian/src/SymbianOS.cpp
+++ b/backends/symbian/src/SymbianOS.cpp
@@ -36,10 +36,6 @@
extern Common::ConfigManager *g_config;
-OSystem *OSystem_SymbianOS_create() {
- return new OSystem_SDL_Symbian();
-}
-
namespace Symbian {
// Show a simple Symbian Info win with Msg & exit
@@ -89,16 +85,21 @@ OSystem_SDL_Symbian::zoneDesc OSystem_SDL_Symbian::_zones[TOTAL_ZONES] = {
{ 0, 145, 150, 55 },
{ 150, 145, 170, 55 }
};
-OSystem_SDL_Symbian::OSystem_SDL_Symbian() :_channels(0),_stereo_mix_buffer(0)
-{
- ConfMan.set("FM_high_quality", false);
+OSystem_SDL_Symbian::OSystem_SDL_Symbian() :_channels(0),_stereo_mix_buffer(0) {
+}
+
+void OSystem_SDL_Symbian::initBackend() {
+ ConfMan.setBool("FM_high_quality", false);
#ifndef S60 // S60 has low quality as default
- ConfMan.set("FM_medium_quality", true);
+ ConfMan.setBool("FM_medium_quality", true);
#else
- ConfMan.set("FM_medium_quality", false);
+ ConfMan.setBool("FM_medium_quality", false);
#endif
- ConfMan.set("joystick_num", 0); // Symbian OS should have joystick_num set to 0 in the ini file , but uiq devices might refuse opening the joystick
+ ConfMan.setInt("joystick_num", 0); // Symbian OS should have joystick_num set to 0 in the ini file , but uiq devices might refuse opening the joystick
ConfMan.flushToDisk();
+
+ OSystem_SDL::initBackend();
+
// Initialize global key mapping for Smartphones
GUI::Actions* actions = GUI::Actions::Instance();
actions->initInstanceMain(this);
diff --git a/backends/symbian/src/SymbianOS.h b/backends/symbian/src/SymbianOS.h
index 3d16bece34..4e8dbeb983 100644
--- a/backends/symbian/src/SymbianOS.h
+++ b/backends/symbian/src/SymbianOS.h
@@ -37,7 +37,15 @@
class OSystem_SDL_Symbian : public OSystem_SDL {
public:
OSystem_SDL_Symbian();
- ~OSystem_SDL_Symbian();
+ virtual ~OSystem_SDL_Symbian();
+
+public:
+ /**
+ * The following method is called once, from main.cpp, after all
+ * config data (including command line params etc.) are fully loaded.
+ */
+ virtual void initBackend();
+
int getDefaultGraphicsMode() const;
const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
bool setGraphicsMode(const char *name);