mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
DS: Remove redundant event observer
This commit is contained in:
parent
8c01baaaff
commit
e3b72b6fef
@ -32,11 +32,9 @@ Keyboard::Keyboard(Common::EventDispatcher *eventDispatcher) :
|
||||
_lastKey(NOKEY),
|
||||
_visible(false) {
|
||||
_eventDispatcher->registerSource(this, false);
|
||||
_eventDispatcher->registerObserver(this, 10, false);
|
||||
}
|
||||
|
||||
Keyboard::~Keyboard() {
|
||||
_eventDispatcher->unregisterObserver(this);
|
||||
_eventDispatcher->unregisterSource(this);
|
||||
}
|
||||
|
||||
@ -133,15 +131,4 @@ bool Keyboard::pollEvent(Common::Event &event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Keyboard::notifyEvent(const Common::Event &event) {
|
||||
if (event.type == Common::EVENT_VIRTUAL_KEYBOARD) {
|
||||
if (g_system->getFeatureState(OSystem::kFeatureVirtualKeyboard))
|
||||
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
|
||||
else
|
||||
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // End of namespace DS
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace DS {
|
||||
|
||||
class Keyboard : public Common::EventSource, public Common::EventObserver {
|
||||
class Keyboard : public Common::EventSource {
|
||||
public:
|
||||
Keyboard(Common::EventDispatcher *eventDispatcher);
|
||||
~Keyboard();
|
||||
@ -41,8 +41,6 @@ public:
|
||||
// Implementation of the EventSource interface
|
||||
virtual bool pollEvent(Common::Event &event);
|
||||
|
||||
virtual bool notifyEvent(const Common::Event &event) override;
|
||||
|
||||
protected:
|
||||
Common::EventDispatcher *_eventDispatcher;
|
||||
int _lastKey;
|
||||
|
Loading…
x
Reference in New Issue
Block a user