From ac7ecbe30cdec598955471d2ed012f36296b78de Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Sun, 29 Mar 2015 22:36:46 +1100 Subject: win32: use a platform-specific unicode entry-point Add a platform-specific entry-point for Windows. This will allow some platform-specific initialization to be added without the need for ugly ifdeffery in main.c. As an immediate advantage, mpv can now use a unicode entry-point and convert the command line arguments to UTF-8 before passing them to mpv_main, so osdep_preinit can be simplified a little bit. --- player/main-fn-unix.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 player/main-fn-unix.c (limited to 'player/main-fn-unix.c') diff --git a/player/main-fn-unix.c b/player/main-fn-unix.c new file mode 100644 index 0000000000..23a047b4dc --- /dev/null +++ b/player/main-fn-unix.c @@ -0,0 +1,15 @@ +#include "config.h" +#include "core.h" + +#if HAVE_COCOA_APPLICATION +#include "osdep/macosx_application.h" +#endif + +int main(int argc, char *argv[]) +{ +#if HAVE_COCOA_APPLICATION + return cocoa_main(mpv_main, argc, argv); +#else + return mpv_main(argc, argv); +#endif +} -- cgit v1.2.3