From 1e7831070f6ae1af0a1a29b0d680ef2907bf8cf6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 May 2015 18:47:57 +0200 Subject: build: move main-fn files to osdep And split the Cocoa and Unix cases. Simplify the Cocoa case slightly by calling mpv_main directly, instead of passing a function pointer. Also add a comment explaining why Cocoa needs a special case at all. --- osdep/main-fn-cocoa.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 osdep/main-fn-cocoa.c (limited to 'osdep/main-fn-cocoa.c') diff --git a/osdep/main-fn-cocoa.c b/osdep/main-fn-cocoa.c new file mode 100644 index 0000000000..eeed127ead --- /dev/null +++ b/osdep/main-fn-cocoa.c @@ -0,0 +1,10 @@ +#include "osdep/macosx_application.h" + +// This is needed because Cocoa absolutely requires creating the NSApplication +// singleton and running it in the "main" thread. It is apparently not +// possible to do this on a separate thread at all. It is not known how +// Apple managed this colossal fuckup. +int main(int argc, char *argv[]) +{ + return cocoa_main(argc, argv); +} -- cgit v1.2.3