From d811240a9d38098f5b1f77b7d8dbef7a947f9a67 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 13 Feb 2012 01:20:02 +0100 Subject: ALL: Enable Keymapper specific OSystem API only when the Keymapper is enabled. --- backends/platform/maemo/maemo.cpp | 10 ++-------- backends/platform/maemo/maemo.h | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'backends/platform/maemo') diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index fe60bdc042..728e8b4023 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -129,16 +129,12 @@ void OSystem_SDL_Maemo::setupIcon() { // http://bugzilla.libsdl.org/show_bug.cgi?id=586 } -Common::HardwareKeySet *OSystem_SDL_Maemo::getHardwareKeySet() { #ifdef ENABLE_KEYMAPPER +Common::HardwareKeySet *OSystem_SDL_Maemo::getHardwareKeySet() { return new Common::HardwareKeySet(Common::maemoKeys, Common::maemoModifiers); -#else - return OSystem_POSIX::getHardwareKeySet(); -#endif } Common::Keymap *OSystem_SDL_Maemo::getGlobalKeymap() { -#ifdef ENABLE_KEYMAPPER using namespace Common; Keymap *globalMap = new Keymap("maemo"); @@ -160,10 +156,8 @@ Common::Keymap *OSystem_SDL_Maemo::getGlobalKeymap() { act->addRightClickEvent(); return globalMap; -#else - return OSystem_POSIX::getGlobalKeymap(); -#endif } +#endif void OSystem_SDL_Maemo::initObserver() { assert(_eventManager); diff --git a/backends/platform/maemo/maemo.h b/backends/platform/maemo/maemo.h index 821f3526e8..382770219b 100644 --- a/backends/platform/maemo/maemo.h +++ b/backends/platform/maemo/maemo.h @@ -41,8 +41,10 @@ public: virtual void fatalError(); virtual void setWindowCaption(const char *caption); virtual void setupIcon(); +#ifdef ENABLE_KEYMAPPER virtual Common::HardwareKeySet *getHardwareKeySet(); virtual Common::Keymap *getGlobalKeymap(); +#endif Model getModel() { return _model; } -- cgit v1.2.3