aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/events/maemosdl/maemosdl-events.cpp2
-rw-r--r--backends/platform/maemo/maemo.cpp8
-rw-r--r--backends/platform/maemo/maemo.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp
index 932be0dc47..0046d297eb 100644
--- a/backends/events/maemosdl/maemosdl-events.cpp
+++ b/backends/events/maemosdl/maemosdl-events.cpp
@@ -200,6 +200,7 @@ MaemoSdlEventObserver::MaemoSdlEventObserver(MaemoSdlEventSource *eventSource) {
}
bool MaemoSdlEventObserver::notifyEvent(const Common::Event &event) {
+#ifdef ENABLE_KEYMAPPER
if (event.type != Common::EVENT_CUSTOM_BACKEND)
return false;
if (event.customType == kEventClickMode) {
@@ -207,6 +208,7 @@ bool MaemoSdlEventObserver::notifyEvent(const Common::Event &event) {
_eventSource->toggleClickMode();
return true;
}
+#endif
return false;
}
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