diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/linuxmoto/hardwarekeys.cpp | 3 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-sdl.h | 2 | ||||
-rw-r--r-- | backends/platform/maemo/maemo.cpp | 10 | ||||
-rw-r--r-- | backends/platform/maemo/maemo.h | 2 | ||||
-rw-r--r-- | backends/platform/sdl/hardwarekeys.cpp | 7 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 | ||||
-rw-r--r-- | backends/platform/webos/webos.cpp | 6 | ||||
-rw-r--r-- | backends/platform/webos/webos.h | 2 |
8 files changed, 14 insertions, 20 deletions
diff --git a/backends/platform/linuxmoto/hardwarekeys.cpp b/backends/platform/linuxmoto/hardwarekeys.cpp index e10e39a23d..cbd9dccf52 100644 --- a/backends/platform/linuxmoto/hardwarekeys.cpp +++ b/backends/platform/linuxmoto/hardwarekeys.cpp @@ -106,9 +106,8 @@ static const Mod modifiers[] = { { KBD_SHIFT | KBD_CTRL | KBD_ALT, "C+A+", "Ctrl+Alt+", true }, { 0, 0, 0, false } }; -#endif - Common::HardwareKeySet *OSystem_LINUXMOTO::getHardwareKeySet() { return OSystem_SDL::getHardwareKeySet(); } +#endif diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.h b/backends/platform/linuxmoto/linuxmoto-sdl.h index 97262ccbca..9a0be56e11 100644 --- a/backends/platform/linuxmoto/linuxmoto-sdl.h +++ b/backends/platform/linuxmoto/linuxmoto-sdl.h @@ -29,8 +29,10 @@ class OSystem_LINUXMOTO : public OSystem_POSIX { public: virtual void initBackend(); +#ifdef ENABLE_KEYMAPPER // FIXME: This just calls parent methods, is it needed? virtual Common::HardwareKeySet *getHardwareKeySet(); +#endif }; #endif 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; } diff --git a/backends/platform/sdl/hardwarekeys.cpp b/backends/platform/sdl/hardwarekeys.cpp index 3e9378602e..1469698a8b 100644 --- a/backends/platform/sdl/hardwarekeys.cpp +++ b/backends/platform/sdl/hardwarekeys.cpp @@ -174,13 +174,8 @@ static const ModifierTableEntry sdlModifiers[] = { { KBD_SHIFT | KBD_CTRL | KBD_ALT, "C+A+", "Ctrl+Alt+", true }, { 0, 0, 0, false } }; -#endif - Common::HardwareKeySet *OSystem_SDL::getHardwareKeySet() { -#ifdef ENABLE_KEYMAPPER return new HardwareKeySet(sdlKeys, sdlModifiers); -#else - return 0; -#endif } +#endif diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 6c84c5c26a..1b0204a6e1 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -63,7 +63,9 @@ public: virtual void engineInit(); virtual void engineDone(); #endif +#ifdef ENABLE_KEYMAPPER virtual Common::HardwareKeySet *getHardwareKeySet(); +#endif virtual void quit(); virtual void fatalError(); diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp index bfb19ed3bc..abf572e6be 100644 --- a/backends/platform/webos/webos.cpp +++ b/backends/platform/webos/webos.cpp @@ -51,8 +51,8 @@ void OSystem_SDL_WebOS::initBackend() { * * @return The hardware key set with added webOS specific keys. */ -HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() { #ifdef ENABLE_KEYMAPPER +HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() { // Get the original SDL hardware key set HardwareKeySet *keySet = OSystem_SDL::getHardwareKeySet(); @@ -62,9 +62,7 @@ HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() { // Return the modified hardware key set return keySet; -#else - return 0; -#endif } +#endif #endif diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h index 850aaf9ce2..71390a1d2c 100644 --- a/backends/platform/webos/webos.h +++ b/backends/platform/webos/webos.h @@ -31,7 +31,9 @@ public: OSystem_SDL_WebOS(); virtual void initBackend(); +#ifdef ENABLE_KEYMAPPER virtual Common::HardwareKeySet *getHardwareKeySet(); +#endif }; #endif |