diff options
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r-- | platform/windows/os_windows.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index cebafdabce..35d90a8308 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1312,10 +1312,13 @@ void OS_Windows::finalize_core() { void OS_Windows::vprint(const char* p_format, va_list p_list, bool p_stderr) { - char buf[16384+1]; - int len = vsnprintf(buf,16384,p_format,p_list); + const unsigned int BUFFER_SIZE = 16384; + char buf[BUFFER_SIZE+1]; // +1 for the terminating character + int len = vsnprintf(buf,BUFFER_SIZE,p_format,p_list); if (len<=0) return; + if(len >= BUFFER_SIZE) + len = BUFFER_SIZE; // Output is too big, will be truncated buf[len]=0; @@ -2154,10 +2157,15 @@ String OS_Windows::get_stdin_string(bool p_block) { } +void OS_Windows::enable_for_stealing_focus(ProcessID pid) { + + AllowSetForegroundWindow(pid); + +} + void OS_Windows::move_window_to_foreground() { SetForegroundWindow(hWnd); - BringWindowToTop(hWnd); } |