From 41c27754688cc5fb7593cdf2c420cef173ccfe92 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 3 Jan 2019 18:54:45 +0100 Subject: [PATCH] Fix of #1501, #1522 This time the wWinMain did not provide a valid command line. Calling ::GetCommandLineW() helped. --- src/slic3r_app_msvc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r_app_msvc.cpp b/src/slic3r_app_msvc.cpp index 9823a325d3..7cd97dfc36 100644 --- a/src/slic3r_app_msvc.cpp +++ b/src/slic3r_app_msvc.cpp @@ -181,10 +181,10 @@ extern "C" { } #ifdef SLIC3R_WRAPPER_NOCONSOLE -int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpCmdLine, int nCmdShow) +int APIENTRY wWinMain(HINSTANCE /* hInstance */, HINSTANCE /* hPrevInstance */, PWSTR /* lpCmdLine */, int /* nCmdShow */) { int argc; - wchar_t **argv = CommandLineToArgvW(lpCmdLine, &argc); + wchar_t **argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); #else int wmain(int argc, wchar_t **argv) {