src/video/uikit/SDL_uikitappdelegate.m
changeset 6587 4ef7c70295c9
parent 6557 87ba88e3f2a9
child 6885 700f1b25f77f
--- a/src/video/uikit/SDL_uikitappdelegate.m	Sun Oct 14 00:24:07 2012 -0700
+++ b/src/video/uikit/SDL_uikitappdelegate.m	Sun Oct 14 01:05:04 2012 -0700
@@ -267,6 +267,17 @@
     }
 }
 
+- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
+{
+    NSURL *fileURL = [url filePathURL];
+    if (fileURL != nil) {
+        SDL_SendDropFile([[fileURL path] UTF8String]);
+    } else {
+        SDL_SendDropFile([[url absoluteString] UTF8String]);
+    }
+    return YES;
+}
+
 @end
 
 #endif /* SDL_VIDEO_DRIVER_UIKIT */