mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Merge pull request #290 from TomHarte/DragAndDrop
Adds drag and drop receivership to the SDL target.
This commit is contained in:
commit
9961d13e2d
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user