aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/maemo/maemo.cpp8
-rw-r--r--backends/platform/maemo/maemo.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp
index 60ed4170e2..09bc3407e0 100644
--- a/backends/platform/maemo/maemo.cpp
+++ b/backends/platform/maemo/maemo.cpp
@@ -49,9 +49,12 @@ OSystem_SDL_Maemo::OSystem_SDL_Maemo()
OSystem_SDL_Maemo::~OSystem_SDL_Maemo() {
delete _eventObserver;
+#ifdef ENABLE_KEYMAPPER
delete _keymapperDefaultBindings;
+#endif
}
+#ifdef ENABLE_KEYMAPPER
static void registerDefaultKeyBindings(Common::KeymapperDefaultBindings *_keymapperDefaultBindings, Model _model) {
_keymapperDefaultBindings->setDefaultBinding("gui", "REM", "HOME");
_keymapperDefaultBindings->setDefaultBinding("global", "REM", "HOME");
@@ -79,6 +82,7 @@ static void registerDefaultKeyBindings(Common::KeymapperDefaultBindings *_keymap
_keymapperDefaultBindings->setDefaultBinding("maemo", "RCL", "ZOOMPLUS");
_keymapperDefaultBindings->setDefaultBinding("maemo", "CLK", "ZOOMMINUS");
}
+#endif
void OSystem_SDL_Maemo::initBackend() {
// Create the events manager
@@ -91,14 +95,18 @@ void OSystem_SDL_Maemo::initBackend() {
if (_eventObserver == 0)
_eventObserver = new MaemoSdlEventObserver((MaemoSdlEventSource *)_eventSource);
+#ifdef ENABLE_KEYMAPPER
if (_keymapperDefaultBindings == 0)
_keymapperDefaultBindings = new Common::KeymapperDefaultBindings();
+#endif
ConfMan.set("vkeybdpath", DATA_PATH);
_model = detectModel();
+#ifdef ENABLE_KEYMAPPER
registerDefaultKeyBindings(_keymapperDefaultBindings, _model);
+#endif
// Call parent implementation of this method
OSystem_POSIX::initBackend();
diff --git a/backends/platform/maemo/maemo.h b/backends/platform/maemo/maemo.h
index 1f3c8b8d47..4b84ae573a 100644
--- a/backends/platform/maemo/maemo.h
+++ b/backends/platform/maemo/maemo.h
@@ -56,7 +56,9 @@ private:
const Model detectModel();
Model _model;
MaemoSdlEventObserver *_eventObserver;
+#ifdef ENABLE_KEYMAPPER
Common::KeymapperDefaultBindings *_keymapperDefaultBindings;
+#endif
};
} // namespace Maemo