diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2015-03-29 22:36:46 +1100 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2015-04-11 14:27:25 +1000 |
commit | ac7ecbe30cdec598955471d2ed012f36296b78de (patch) | |
tree | cd62299e8df947fa73787a857e5019277ed5d952 /player/main-fn-unix.c | |
parent | 6f46bafbd06e6a107e55f35860744ed66c1b8426 (diff) | |
download | mpv-ac7ecbe30cdec598955471d2ed012f36296b78de.tar.bz2 mpv-ac7ecbe30cdec598955471d2ed012f36296b78de.tar.xz |
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.
Diffstat (limited to 'player/main-fn-unix.c')
-rw-r--r-- | player/main-fn-unix.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 +} |