aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/maemo
diff options
context:
space:
mode:
authorTarek Soliman2011-10-11 18:17:30 -0500
committerTarek Soliman2011-10-11 19:54:16 -0500
commitb56e9e2ef11e8eac17c02972a237bfd5e1d6674d (patch)
tree3e327b098b308ecf2803d7528456f662005f81cd /backends/platform/maemo
parent52fae5524c39044762b906ca938b99650d624491 (diff)
downloadscummvm-rg350-b56e9e2ef11e8eac17c02972a237bfd5e1d6674d.tar.gz
scummvm-rg350-b56e9e2ef11e8eac17c02972a237bfd5e1d6674d.tar.bz2
scummvm-rg350-b56e9e2ef11e8eac17c02972a237bfd5e1d6674d.zip
MAEMO: Migrate OSystem_SDL_Maemo to Maemo namespace
Diffstat (limited to 'backends/platform/maemo')
-rw-r--r--backends/platform/maemo/maemo.cpp9
-rw-r--r--backends/platform/maemo/maemo.h9
-rw-r--r--backends/platform/maemo/main.cpp6
3 files changed, 15 insertions, 9 deletions
diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp
index 4f05f5ccb2..3571039e62 100644
--- a/backends/platform/maemo/maemo.cpp
+++ b/backends/platform/maemo/maemo.cpp
@@ -35,6 +35,8 @@
#include <SDL/SDL_syswm.h>
#include <X11/Xutil.h>
+namespace Maemo {
+
OSystem_SDL_Maemo::OSystem_SDL_Maemo()
:
OSystem_POSIX() {
@@ -47,7 +49,7 @@ void OSystem_SDL_Maemo::initBackend() {
ConfMan.set("vkeybdpath", DATA_PATH);
- _model = Maemo::Model(detectModel());
+ _model = Model(detectModel());
// Call parent implementation of this method
OSystem_POSIX::initBackend();
@@ -98,13 +100,14 @@ void OSystem_SDL_Maemo::setWindowCaption(const char *caption) {
const Maemo::Model OSystem_SDL_Maemo::detectModel() {
Common::String deviceHwId = Common::String(getenv("SCUMMVM_MAEMO_DEVICE"));
- const Maemo::Model *model;
- for (model = Maemo::models; model->hwId; model++) {
+ const Model *model;
+ for (model = models; model->hwId; model++) {
if (deviceHwId.equals(model->hwId))
return *model;
}
return *model;
}
+} //namespace Maemo
#endif
diff --git a/backends/platform/maemo/maemo.h b/backends/platform/maemo/maemo.h
index c80639600e..e42936ddf0 100644
--- a/backends/platform/maemo/maemo.h
+++ b/backends/platform/maemo/maemo.h
@@ -28,6 +28,7 @@
#include "backends/platform/sdl/posix/posix.h"
#include "backends/platform/maemo/maemo-common.h"
+namespace Maemo {
class OSystem_SDL_Maemo : public OSystem_POSIX {
public:
@@ -38,16 +39,18 @@ public:
virtual void fatalError();
virtual void setWindowCaption(const char *caption);
- Maemo::Model getModel() { return _model; }
+ Model getModel() { return _model; }
private:
virtual void setXWindowName(const char *caption);
- const Maemo::Model detectModel();
- Maemo::Model _model;
+ const Model detectModel();
+ Model _model;
};
+} // namespace Maemo
+
#endif // ifndef PLATFORM_SDL_MAEMO_H
#endif // if defined(MAEMO)
diff --git a/backends/platform/maemo/main.cpp b/backends/platform/maemo/main.cpp
index 6b69cd81d0..7e8a316eb5 100644
--- a/backends/platform/maemo/main.cpp
+++ b/backends/platform/maemo/main.cpp
@@ -31,10 +31,10 @@
#include <unistd.h>
int main(int argc, char* argv[]) {
- g_system = new OSystem_SDL_Maemo();
+ g_system = new Maemo::OSystem_SDL_Maemo();
assert(g_system);
- ((OSystem_SDL_Maemo *)g_system)->init();
+ ((Maemo::OSystem_SDL_Maemo *)g_system)->init();
#ifdef DYNAMIC_MODULES
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
@@ -44,7 +44,7 @@ int main(int argc, char* argv[]) {
int res = scummvm_main(argc, argv);
// Free OSystem
- delete (OSystem_SDL_Maemo *)g_system;
+ delete (Maemo::OSystem_SDL_Maemo *)g_system;
return res;
}