mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
KEYMAPPER: Create a DefaultEventMapper when Keymapper isn't enabled
This allows migration to unconditional mapping
This commit is contained in:
parent
e7ade8ae05
commit
5c3e48fddf
@ -60,6 +60,8 @@ DefaultEventManager::DefaultEventManager(Common::EventSource *boss) :
|
||||
// EventDispatcher will automatically free the keymapper
|
||||
_dispatcher.registerMapper(_keymapper);
|
||||
_remap = false;
|
||||
#else
|
||||
_dispatcher.registerMapper(new Common::DefaultEventMapper());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -219,6 +219,11 @@ public:
|
||||
bool allowMapping() const { return false; }
|
||||
};
|
||||
|
||||
class DefaultEventMapper : public EventMapper, private ArtificialEventSource {
|
||||
bool notifyEvent(const Event &ev) { ArtificialEventSource::addEvent(Event(ev)); return true; }
|
||||
bool pollEvent(Event &ev) { return ArtificialEventSource::pollEvent(ev); }
|
||||
};
|
||||
|
||||
/**
|
||||
* Dispatches events from various sources to various observers.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user