Hide command prompt launched by OS.execute

Currently, the console appears when running OS.execute in an exported project,
but not in the editor. This change prevents it from appearing in either.

Only affects console applications.
This commit is contained in:
hoontee 2019-03-05 16:11:08 -06:00 committed by Rémi Verschelde
parent 7b569e91c0
commit 4a58c0487a

View file

@ -2586,7 +2586,7 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments,
modstr.resize(cmdline.size());
for (int i = 0; i < cmdline.size(); i++)
modstr.write[i] = cmdline[i];
int ret = CreateProcessW(NULL, modstr.ptrw(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS, NULL, NULL, si_w, &pi.pi);
int ret = CreateProcessW(NULL, modstr.ptrw(), NULL, NULL, 0, NORMAL_PRIORITY_CLASS & CREATE_NO_WINDOW, NULL, NULL, si_w, &pi.pi);
ERR_FAIL_COND_V(ret == 0, ERR_CANT_FORK);
if (p_blocking) {