aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/maemo/maemo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/maemo/maemo.cpp')
-rw-r--r--backends/platform/maemo/maemo.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp
index 1fb7ad0691..454a13631c 100644
--- a/backends/platform/maemo/maemo.cpp
+++ b/backends/platform/maemo/maemo.cpp
@@ -22,17 +22,22 @@
#if defined(MAEMO)
+#define FORBIDDEN_SYMBOL_EXCEPTION_getenv
+
#include "common/scummsys.h"
#include "common/config-manager.h"
#include "backends/platform/maemo/maemo.h"
#include "backends/events/maemosdl/maemosdl-events.h"
+#include "backends/graphics/maemosdl/maemosdl-graphics.h"
#include "common/textconsole.h"
#include <SDL/SDL_syswm.h>
#include <X11/Xutil.h>
+namespace Maemo {
+
OSystem_SDL_Maemo::OSystem_SDL_Maemo()
:
OSystem_POSIX() {
@@ -43,8 +48,13 @@ void OSystem_SDL_Maemo::initBackend() {
if (_eventSource == 0)
_eventSource = new MaemoSdlEventSource();
+ if (_graphicsManager == 0)
+ _graphicsManager = new MaemoSdlGraphicsManager(_eventSource);
+
ConfMan.set("vkeybdpath", DATA_PATH);
+ _model = Model(detectModel());
+
// Call parent implementation of this method
OSystem_POSIX::initBackend();
}
@@ -92,6 +102,22 @@ void OSystem_SDL_Maemo::setWindowCaption(const char *caption) {
setXWindowName(cap.c_str());
}
+const Maemo::Model OSystem_SDL_Maemo::detectModel() {
+ Common::String deviceHwId = Common::String(getenv("SCUMMVM_MAEMO_DEVICE"));
+ const Model *model;
+ for (model = models; model->hwId; model++) {
+ if (deviceHwId.equals(model->hwId))
+ return *model;
+ }
+ return *model;
+}
+
+void OSystem_SDL_Maemo::setupIcon() {
+ // no Maemo version needs setupIcon
+ // also N900 is hit by SDL_WM_SetIcon bug (window cannot receive input)
+ // http://bugzilla.libsdl.org/show_bug.cgi?id=586
+}
+} //namespace Maemo
#endif