diff options
Diffstat (limited to 'backends/events/default')
-rw-r--r-- | backends/events/default/default-events.cpp | 7 | ||||
-rw-r--r-- | backends/events/default/default-events.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index fa9ff38330..9bafdd9e4f 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -196,10 +196,11 @@ DefaultEventManager::DefaultEventManager(OSystem *boss) : } _vk = new Common::VirtualKeyboard(); - _keyMapper = new Common::Keymapper(this); + _keymapper = new Common::Keymapper(this); } DefaultEventManager::~DefaultEventManager() { + delete _keymapper; delete _vk; _boss->lockMutex(_timeMutex); _boss->lockMutex(_recorderMutex); @@ -372,10 +373,10 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { if (result) { // send key press events to keymapper if (event.type == Common::EVENT_KEYDOWN) { - if (_keyMapper->mapKeyDown(event.kbd)) + if (_keymapper->mapKeyDown(event.kbd)) result = false; } else if (event.type == Common::EVENT_KEYUP) { - if (_keyMapper->mapKeyUp(event.kbd)) + if (_keymapper->mapKeyUp(event.kbd)) result = false; } } diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h index 2dd3ccc6e2..8e24120ad0 100644 --- a/backends/events/default/default-events.h +++ b/backends/events/default/default-events.h @@ -32,7 +32,6 @@ namespace Common { class VirtualKeyboard; - class Keymapper; } /* @@ -51,7 +50,7 @@ class DefaultEventManager : public Common::EventManager { OSystem *_boss; Common::VirtualKeyboard *_vk; - Common::Keymapper *_keyMapper; + Common::Keymapper *_keymapper; Common::Queue<Common::Event> _artificialEventQueue; int _artificialEventCounter; @@ -130,6 +129,7 @@ public: virtual int getButtonState() const { return _buttonState; } virtual int getModifierState() const { return _modifierState; } virtual int shouldQuit() const { return _shouldQuit; } + virtual Common::Keymapper *getKeymapper() { return _keymapper; } }; #endif |