From b56e9e2ef11e8eac17c02972a237bfd5e1d6674d Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Tue, 11 Oct 2011 18:17:30 -0500 Subject: MAEMO: Migrate OSystem_SDL_Maemo to Maemo namespace --- backends/platform/maemo/maemo.cpp | 9 ++++++--- backends/platform/maemo/maemo.h | 9 ++++++--- backends/platform/maemo/main.cpp | 6 +++--- 3 files changed, 15 insertions(+), 9 deletions(-) (limited to 'backends/platform/maemo') 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 #include +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 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; } -- cgit v1.2.3