aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTarek Soliman2012-02-22 18:30:47 -0600
committerTarek Soliman2012-03-02 20:48:50 -0600
commitd12f21b31db2985faeb2e2a6b9b09cd210f82c34 (patch)
tree7340a06802eded01eb68c224a3e958bb37185a31 /common
parent4ee1a3aceae7d68c89513f7d122606acbceb1e7c (diff)
downloadscummvm-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')
-rw-r--r--common/EventMapper.cpp10
-rw-r--r--common/events.h2
2 files changed, 12 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;
}
diff --git a/common/events.h b/common/events.h
index 4efdd67b91..7e411ecce5 100644
--- a/common/events.h
+++ b/common/events.h
@@ -79,6 +79,8 @@ enum EventType {
// IMPORTANT NOTE: This is part of the WIP Keymapper. If you plan to use
// this, please talk to tsoliman and/or LordHoto.
EVENT_CUSTOM_BACKEND_ACTION = 18,
+ EVENT_CUSTOM_BACKEND_HARDWARE = 21,
+ EVENT_GUI_REMAP_COMPLETE_ACTION = 22,
EVENT_KEYMAPPER_REMAP = 19
#endif
#ifdef ENABLE_VKEYBD