diff --git a/src/she/skia/she.cpp b/src/she/skia/she.cpp index e3c4af775..9482dab8e 100644 --- a/src/she/skia/she.cpp +++ b/src/she/skia/she.cpp @@ -8,6 +8,7 @@ #include "config.h" #endif +#include "base/memory.h" #include "gfx/rect.h" #include "gfx/size.h" #include "she/she.h" @@ -66,10 +67,21 @@ extern int app_main(int argc, char* argv[]); #if _WIN32 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPSTR lpCmdLine, int nCmdShow) + LPSTR lpCmdLine, int nCmdShow) { - int argc = 1; - char* argv[] = { "" }; + int argc = 0; + LPWSTR* argvW = CommandLineToArgvW(GetCommandLineW(), &argc); + char** argv; + if (argvW && argc > 0) { + argv = new char*[argc]; + for (int i=0; i