From c0d628cc8077e71725f0bee9a5692b826af392fd Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 4 Oct 2016 22:29:08 -0400 Subject: [PATCH] Adds code to, theoretically, insert a drag-n-drop disk image. This is only a theory since SDL2 or OS X 10.12 seem to have a nasty bug where drag-n-drop overfrees some memory and crashes (which happens even without this code in place). --- src/sdl2_driver.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sdl2_driver.c b/src/sdl2_driver.c index 88f348a..9f606f7 100644 --- a/src/sdl2_driver.c +++ b/src/sdl2_driver.c @@ -384,6 +384,14 @@ check_input_events_sdl() SDL_Quit(); my_exit(1); break; + case SDL_DROPFILE: + { + char *file = event.drop.file; + cfg_inspect_maybe_insert_file(file, 0); + SDL_free(file); + } + break; + default: break; }