ALL: Enable Keymapper specific OSystem API only when the Keymapper is enabled.

This commit is contained in:
Johannes Schickel 2012-02-13 01:20:02 +01:00
parent 143363d5b6
commit d811240a9d
10 changed files with 18 additions and 27 deletions

View file

@ -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);

View file

@ -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; }