diff options
author | Cameron Cawley | 2019-09-20 00:33:32 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-09-21 22:16:01 +0300 |
commit | 7bf22fa99613c5815317583bd5e1ac1dff693046 (patch) | |
tree | 6ea008336279cbde0cf883f8ff58faf147be8c22 | |
parent | ec4c846e8cde5ba578bd5385698efaf6d530a716 (diff) | |
download | scummvm-rg350-7bf22fa99613c5815317583bd5e1ac1dff693046.tar.gz scummvm-rg350-7bf22fa99613c5815317583bd5e1ac1dff693046.tar.bz2 scummvm-rg350-7bf22fa99613c5815317583bd5e1ac1dff693046.zip |
BACKENDS: Add EVENT_CLIPBOARD_UPDATE event
-rw-r--r-- | backends/events/sdl/sdl-events.cpp | 4 | ||||
-rw-r--r-- | common/events.h | 4 | ||||
-rw-r--r-- | engines/wage/gui.cpp | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp index c3c316e334..1c661a4cef 100644 --- a/backends/events/sdl/sdl-events.cpp +++ b/backends/events/sdl/sdl-events.cpp @@ -650,6 +650,10 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) { event.path = Common::String(ev.drop.file); SDL_free(ev.drop.file); return true; + + case SDL_CLIPBOARDUPDATE: + event.type = Common::EVENT_CLIPBOARD_UPDATE; + return true; #else case SDL_VIDEOEXPOSE: if (_graphicsManager) diff --git a/common/events.h b/common/events.h index cbd6153e54..134f1ea45b 100644 --- a/common/events.h +++ b/common/events.h @@ -90,7 +90,9 @@ enum EventType { EVENT_JOYAXIS_MOTION = 24, EVENT_JOYBUTTON_DOWN = 25, - EVENT_JOYBUTTON_UP = 26 + EVENT_JOYBUTTON_UP = 26, + + EVENT_CLIPBOARD_UPDATE = 27 }; const int16 JOYAXIS_MIN = -32768; diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 51c140fdb6..609fe35666 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -242,6 +242,10 @@ void Gui::regenWeaponsMenu() { } bool Gui::processEvent(Common::Event &event) { + if (event.type == Common::EVENT_CLIPBOARD_UPDATE) { + _menu->enableCommand(kMenuEdit, kMenuActionPaste, true); + } + return _wm.processEvent(event); } |