From 90af395df2bfdbbb975c02c06f9dacf6a103adca Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 19 Nov 2017 18:05:31 -0500 Subject: [PATCH 1/2] Adds support for receiving dragged and dropped files under SDL. --- OSBindings/SDL/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OSBindings/SDL/main.cpp b/OSBindings/SDL/main.cpp index bf00343e6..ca8211c82 100644 --- a/OSBindings/SDL/main.cpp +++ b/OSBindings/SDL/main.cpp @@ -339,6 +339,11 @@ int main(int argc, char *argv[]) { } break; + case SDL_DROPFILE: { + StaticAnalyser::Media media = StaticAnalyser::GetMedia(event.drop.file); + machine->configuration_target()->insert_media(media); + } break; + case SDL_KEYDOWN: case SDL_KEYUP: { KeyboardMachine::Machine *keyboard_machine = machine->keyboard_machine(); From 29b5ccc7679cb498980448d7f8f2a8f1b7af94ac Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 19 Nov 2017 18:05:39 -0500 Subject: [PATCH 2/2] Removes redundant logging on the Mac. --- OSBindings/Mac/Clock Signal/Views/CSOpenGLView.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/Views/CSOpenGLView.m b/OSBindings/Mac/Clock Signal/Views/CSOpenGLView.m index 1a9d87ed8..596dd9daa 100644 --- a/OSBindings/Mac/Clock Signal/Views/CSOpenGLView.m +++ b/OSBindings/Mac/Clock Signal/Views/CSOpenGLView.m @@ -169,8 +169,6 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt for(NSPasteboardItem *item in [[sender draggingPasteboard] pasteboardItems]) { NSURL *URL = [NSURL URLWithString:[item stringForType:(__bridge NSString *)kUTTypeFileURL]]; - - NSLog(@"%@", URL); [self.delegate openGLView:self didReceiveFileAtURL:URL]; } return YES;