mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
ALL: Enable Keymapper specific OSystem API only when the Keymapper is enabled.
This commit is contained in:
parent
143363d5b6
commit
d811240a9d
@ -105,13 +105,6 @@ public:
|
||||
|
||||
//@}
|
||||
|
||||
/** @name Events and Time */
|
||||
//@{
|
||||
|
||||
virtual Common::HardwareKeySet *getHardwareKeySet() { return 0; }
|
||||
|
||||
//@}
|
||||
|
||||
/** @name Mutex handling */
|
||||
//@{
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -31,7 +31,9 @@ public:
|
||||
OSystem_SDL_WebOS();
|
||||
|
||||
virtual void initBackend();
|
||||
#ifdef ENABLE_KEYMAPPER
|
||||
virtual Common::HardwareKeySet *getHardwareKeySet();
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -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
|
||||
//@}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user