Browse Source

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.
hoontee 6 years ago
parent
commit
4a58c0487a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      platform/windows/os_windows.cpp

+ 1 - 1
platform/windows/os_windows.cpp

@@ -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) {