diff options
author | Matthew Hoops | 2011-12-12 15:25:28 -0500 |
---|---|---|
committer | Matthew Hoops | 2011-12-12 15:25:28 -0500 |
commit | 00279659b22cbd5db739d5351e83a9fc2a2ae408 (patch) | |
tree | 497f06f46820043cbdf1725652b8f0073223e24a /backends/platform/maemo/maemo.cpp | |
parent | d932df79bed5aac97e17c0920a5e75cb5ce733ee (diff) | |
parent | d1628feb761acc9f4607f64de3eb620fea53bcc9 (diff) | |
download | scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.tar.gz scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.tar.bz2 scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.zip |
Merge remote branch 'upstream/master' into pegasus
Conflicts:
video/qt_decoder.cpp
Diffstat (limited to 'backends/platform/maemo/maemo.cpp')
-rw-r--r-- | backends/platform/maemo/maemo.cpp | 26 |
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 |