win: console if launching with debugger

This commit is contained in:
Kae 2024-08-25 20:28:42 +10:00
parent 8332536399
commit f0a08aea22

View File

@ -18,6 +18,10 @@ namespace Star {
LPWSTR* argsList = CommandLineToArgvW(GetCommandLineW(), &nArgs); \
Star::StringList args; \
for (int i = 0; i < nArgs; ++i) args.append(Star::String(argsList[i])); \
if (IsDebuggerPresent() && AllocConsole()) { \
freopen("CONOUT$", "w", stdout); \
freopen("CONOUT$", "w", stderr); \
} \
return Star::runMainApplication(Star::make_unique<ApplicationClass>(), args); \
}