2015-03-29 11:36:46 +00:00
|
|
|
#include "config.h"
|
|
|
|
#include "core.h"
|
|
|
|
#include "osdep/io.h"
|
2015-03-29 14:19:29 +00:00
|
|
|
#include "osdep/terminal.h"
|
2015-03-29 11:36:46 +00:00
|
|
|
|
|
|
|
int wmain(int argc, wchar_t *argv[]);
|
|
|
|
|
|
|
|
// mpv does its own wildcard expansion in the option parser
|
|
|
|
int _dowildcard = 0;
|
|
|
|
|
|
|
|
int wmain(int argc, wchar_t *argv[])
|
|
|
|
{
|
2015-03-29 14:19:29 +00:00
|
|
|
// If started from the console wrapper (see osdep/win32-console-wrapper.c),
|
|
|
|
// attach to the console and set up the standard IO handles
|
|
|
|
terminal_try_attach();
|
|
|
|
|
2015-03-29 11:36:46 +00:00
|
|
|
char **argv_u8 = talloc_zero_array(NULL, char*, argc + 1);
|
|
|
|
for (int i = 0; i < argc; i++)
|
|
|
|
argv_u8[i] = mp_to_utf8(argv_u8, argv[i]);
|
|
|
|
|
|
|
|
int ret = mpv_main(argc, argv_u8);
|
|
|
|
|
|
|
|
talloc_free(argv_u8);
|
|
|
|
return ret;
|
|
|
|
}
|