diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-04-23 17:39:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-23 17:39:23 +0200 |
commit | 6098a7f1914f64c77d689f54d5432095911b744f (patch) | |
tree | bf07da3b3177f3d104ecb5a66a7dc24b207fb08a /platform/windows | |
parent | b0da7b66ce278179eedd0e21dae1d84ed3f4459d (diff) | |
parent | dd03dcbd5a1d4a23d4fb3aa41da0c91fe2c5eda5 (diff) | |
download | redot-engine-6098a7f1914f64c77d689f54d5432095911b744f.tar.gz |
Merge pull request #27781 from reduz/new_android_export
Android now (optionally) builds the template when exporting
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 8 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 5e12106639..0c3d8af220 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2460,7 +2460,7 @@ void OS_Windows::GetMaskBitmaps(HBITMAP hSourceBitmap, COLORREF clrTransparent, DeleteDC(hMainDC); } -Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) { +Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) { if (p_blocking && r_pipe) { @@ -2479,7 +2479,13 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, char buf[65535]; while (fgets(buf, 65535, f)) { + if (p_pipe_mutex) { + p_pipe_mutex->lock(); + } (*r_pipe) += buf; + if (p_pipe_mutex) { + p_pipe_mutex->lock(); + } } int rv = _pclose(f); diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index c15e1cabc3..0e0b9bf3f6 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -261,7 +261,7 @@ public: virtual void delay_usec(uint32_t p_usec) const; virtual uint64_t get_ticks_usec() const; - virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false); + virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false, Mutex *p_pipe_mutex = NULL); virtual Error kill(const ProcessID &p_pid); virtual int get_process_id() const; |