summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2014-01-06 13:18:02 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2014-01-06 13:18:02 +0100
commitc849f1aa2353c8877b6dce58899f2dfd053fe808 (patch)
treea7df3ec1ee9ba96d41e1f70030980bd451a243e6
parent8bfb20acdc42108db7bf79b5294ed2aa9a3df51b (diff)
downloadmpv-c849f1aa2353c8877b6dce58899f2dfd053fe808.tar.bz2
mpv-c849f1aa2353c8877b6dce58899f2dfd053fe808.tar.xz
win32-console-wrapper: remove command line mangling
This wasn't really necessary and caused a lot of problems.
-rw-r--r--osdep/win32-console-wrapper.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/osdep/win32-console-wrapper.c b/osdep/win32-console-wrapper.c
index 2993271ee5..9d86ea3872 100644
--- a/osdep/win32-console-wrapper.c
+++ b/osdep/win32-console-wrapper.c
@@ -61,23 +61,14 @@ void cr_runproc(wchar_t *name, wchar_t *cmdline)
int wmain(int argc, wchar_t **argv, wchar_t **envp)
{
- wchar_t *cmd, *args, *eargs;
+ wchar_t *cmd;
wchar_t exe[MAX_PATH];
- size_t len;
cmd = GetCommandLineW();
- args = cmd + wcslen(argv[0]);
-
GetModuleFileNameW(NULL, exe, MAX_PATH);
wcscpy(wcsrchr(exe, '.') + 1, L"exe");
- len = wcslen(exe) + wcslen(args) + 1;
- eargs = malloc(len * sizeof(wchar_t));
- swprintf(eargs, len, L"%s%s", exe, args);
- LocalFree(cmd);
-
- cr_runproc(exe, eargs);
+ cr_runproc(exe, cmd);
- free(eargs);
return 0;
}