aboutsummaryrefslogtreecommitdiff
path: root/backends/events/sdl
diff options
context:
space:
mode:
authorCameron Cawley2019-03-23 22:35:23 +0000
committerThierry Crozat2019-04-30 22:17:04 +0100
commitd7b2b1b8f94c15437eb2c1b46c345ebc44f9588e (patch)
tree27b36c7dac96991eac33fe374ef3bb37dca9c09d /backends/events/sdl
parentfb26f21d0478a29da16bd7daa10110aa97a2b604 (diff)
downloadscummvm-rg350-d7b2b1b8f94c15437eb2c1b46c345ebc44f9588e.tar.gz
scummvm-rg350-d7b2b1b8f94c15437eb2c1b46c345ebc44f9588e.tar.bz2
scummvm-rg350-d7b2b1b8f94c15437eb2c1b46c345ebc44f9588e.zip
GUI: Support adding games via Drag and Drop
Diffstat (limited to 'backends/events/sdl')
-rw-r--r--backends/events/sdl/sdl-events.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index ff5f4b9ce3..404528ba25 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -640,6 +640,12 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
case SDL_JOYDEVICEREMOVED:
return handleJoystickRemoved(ev.jdevice);
+
+ case SDL_DROPFILE:
+ event.type = Common::EVENT_DROP_FILE;
+ event.path = Common::String(ev.drop.file);
+ SDL_free(ev.drop.file);
+ return true;
#else
case SDL_VIDEOEXPOSE:
if (_graphicsManager)