aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/events/sdl/sdl-events.cpp4
-rw-r--r--common/events.h4
-rw-r--r--engines/wage/gui.cpp4
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);
}