aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/modular-backend.h7
-rw-r--r--backends/platform/linuxmoto/hardwarekeys.cpp3
-rw-r--r--backends/platform/linuxmoto/linuxmoto-sdl.h2
-rw-r--r--backends/platform/maemo/maemo.cpp10
-rw-r--r--backends/platform/maemo/maemo.h2
-rw-r--r--backends/platform/sdl/hardwarekeys.cpp7
-rw-r--r--backends/platform/sdl/sdl.h2
-rw-r--r--backends/platform/webos/webos.cpp6
-rw-r--r--backends/platform/webos/webos.h2
-rw-r--r--common/system.h4
10 files changed, 18 insertions, 27 deletions
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index b864da0df5..072ee805b6 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -105,13 +105,6 @@ public:
//@}
- /** @name Events and Time */
- //@{
-
- virtual Common::HardwareKeySet *getHardwareKeySet() { return 0; }
-
- //@}
-
/** @name Mutex handling */
//@{
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
diff --git a/common/system.h b/common/system.h
index 2a651bba2b..c5e8214d22 100644
--- a/common/system.h
+++ b/common/system.h
@@ -51,8 +51,10 @@ class UpdateManager;
class TimerManager;
class SeekableReadStream;
class WriteStream;
+#ifdef ENABLE_KEYMAPPER
class HardwareKeySet;
class Keymap;
+#endif
}
class AudioCDManager;
@@ -933,6 +935,7 @@ public:
return _eventManager;
}
+#ifdef ENABLE_KEYMAPPER
/**
* Register hardware keys with keymapper
*
@@ -952,6 +955,7 @@ public:
* See keymapper documentation for further reference.
*/
virtual Common::Keymap *getGlobalKeymap() { return 0; }
+#endif
//@}