diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-27 11:48:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 11:48:53 +0100 |
commit | 203e261526ebe123523d7e6ea6cfc6c628216e9d (patch) | |
tree | 83b9277d426f07a7aa0d73b0ba9b693a9c494234 /platform | |
parent | aa94d5d61a793708e631e1533a04db63e5fad16f (diff) | |
parent | 9590eeebb53f084a3d61d8dfbd21dc2fa89705e7 (diff) |
Merge pull request #57293 from mhilbrunner/windows-console-fixups
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/os_windows.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 06b8fea681..41ba1092db 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -385,14 +385,14 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, } inherit_handles = true; } - DWORD creaton_flags = NORMAL_PRIORITY_CLASS; + DWORD creation_flags = NORMAL_PRIORITY_CLASS; if (p_open_console) { - creaton_flags |= CREATE_NEW_CONSOLE; + creation_flags |= CREATE_NEW_CONSOLE; } else { - creaton_flags |= CREATE_NO_WINDOW; + creation_flags |= CREATE_NO_WINDOW; } - int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, inherit_handles, creaton_flags, nullptr, nullptr, si_w, &pi.pi); + int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, inherit_handles, creation_flags, nullptr, nullptr, si_w, &pi.pi); if (!ret && r_pipe) { CloseHandle(pipe[0]); // Cleanup pipe handles. CloseHandle(pipe[1]); @@ -446,14 +446,14 @@ Error OS_Windows::create_process(const String &p_path, const List<String> &p_arg ZeroMemory(&pi.pi, sizeof(pi.pi)); LPSTARTUPINFOW si_w = (LPSTARTUPINFOW)&pi.si; - DWORD creaton_flags = NORMAL_PRIORITY_CLASS; + DWORD creation_flags = NORMAL_PRIORITY_CLASS; if (p_open_console) { - creaton_flags |= CREATE_NEW_CONSOLE; + creation_flags |= CREATE_NEW_CONSOLE; } else { - creaton_flags |= CREATE_NO_WINDOW; + creation_flags |= CREATE_NO_WINDOW; } - int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, creaton_flags, nullptr, nullptr, si_w, &pi.pi); + int ret = CreateProcessW(nullptr, (LPWSTR)(command.utf16().ptrw()), nullptr, nullptr, false, creation_flags, nullptr, nullptr, si_w, &pi.pi); ERR_FAIL_COND_V_MSG(ret == 0, ERR_CANT_FORK, "Could not create child process: " + command); ProcessID pid = pi.pi.dwProcessId; |