diff options
author | Tarek Soliman | 2012-02-22 18:30:47 -0600 |
---|---|---|
committer | Tarek Soliman | 2012-03-02 20:48:50 -0600 |
commit | d12f21b31db2985faeb2e2a6b9b09cd210f82c34 (patch) | |
tree | 7340a06802eded01eb68c224a3e958bb37185a31 /common/EventMapper.cpp | |
parent | 4ee1a3aceae7d68c89513f7d122606acbceb1e7c (diff) | |
download | scummvm-rg350-d12f21b31db2985faeb2e2a6b9b09cd210f82c34.tar.gz scummvm-rg350-d12f21b31db2985faeb2e2a6b9b09cd210f82c34.tar.bz2 scummvm-rg350-d12f21b31db2985faeb2e2a6b9b09cd210f82c34.zip |
KEYMAPPER: Map non-key custom input events
This also makes the keymapper be in charge of keymapping logic
Diffstat (limited to 'common/EventMapper.cpp')
-rw-r--r-- | common/EventMapper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp index 2808a7b5fd..0771ecdd89 100644 --- a/common/EventMapper.cpp +++ b/common/EventMapper.cpp @@ -21,6 +21,7 @@ */ #include "common/events.h" +#include "common/textconsole.h" namespace Common { @@ -46,6 +47,15 @@ List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) { // if it didn't get mapped, just pass it through if (mappedEvent.type == EVENT_INVALID) mappedEvent = ev; + +#ifdef ENABLE_VKEYBD + // TODO: this check is not needed post-split + if (mappedEvent.type == EVENT_CUSTOM_BACKEND_HARDWARE) { + warning("EVENT_CUSTOM_BACKEND_HARDWARE was not mapped"); + return List<Event>(); + } +#endif + events.push_back(mappedEvent); return events; } |