diff options
author | McCabe Maxsted | 2011-03-14 16:58:37 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-03-14 17:00:21 -0700 |
commit | 5be2952cc340b70aee026fc9a65a10bd6c5e52e0 (patch) | |
tree | ab84aea8a2f06b3db10f626aa7c3614db1dd2da2 /linden/indra | |
parent | Added copy text button to Help > About Imprudence and tabbed the info. Ported... (diff) | |
download | meta-impy-5be2952cc340b70aee026fc9a65a10bd6c5e52e0.zip meta-impy-5be2952cc340b70aee026fc9a65a10bd6c5e52e0.tar.gz meta-impy-5be2952cc340b70aee026fc9a65a10bd6c5e52e0.tar.bz2 meta-impy-5be2952cc340b70aee026fc9a65a10bd6c5e52e0.tar.xz |
Use a buffer for debug console output (improves speed on Windows when console is enabled). Ported from Singularity, patch by Shyotl
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/llcommon/llerror.cpp | 3 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_win32.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llappviewerwin32.cpp | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/llcommon/llerror.cpp b/linden/indra/llcommon/llerror.cpp index 532a453..aeba629 100644 --- a/linden/indra/llcommon/llerror.cpp +++ b/linden/indra/llcommon/llerror.cpp | |||
@@ -168,6 +168,9 @@ namespace { | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | fprintf(stderr, "%s\n", message.c_str()); | 170 | fprintf(stderr, "%s\n", message.c_str()); |
171 | #if LL_WINDOWS | ||
172 | fflush(stderr); //Now using a buffer. flush is required. | ||
173 | #endif | ||
171 | if (ANSI_YES == mUseANSI) colorANSI("0"); // reset | 174 | if (ANSI_YES == mUseANSI) colorANSI("0"); // reset |
172 | } | 175 | } |
173 | 176 | ||
diff --git a/linden/indra/llvfs/lldir_win32.cpp b/linden/indra/llvfs/lldir_win32.cpp index 9d4c5ec..e5d6747 100644 --- a/linden/indra/llvfs/lldir_win32.cpp +++ b/linden/indra/llvfs/lldir_win32.cpp | |||
@@ -112,7 +112,7 @@ LLDir_Win32::LLDir_Win32() | |||
112 | } | 112 | } |
113 | else | 113 | else |
114 | { | 114 | { |
115 | fprintf(stderr, "Couldn't get APP path, assuming current directory!"); | 115 | LL_WARNS("AppInit") << "Couldn't get APP path, assuming current directory!\n" << LL_ENDL; |
116 | GetCurrentDirectory(MAX_PATH, w_str); | 116 | GetCurrentDirectory(MAX_PATH, w_str); |
117 | mExecutableDir = utf16str_to_utf8str(llutf16string(w_str)); | 117 | mExecutableDir = utf16str_to_utf8str(llutf16string(w_str)); |
118 | // Assume it's the current directory | 118 | // Assume it's the current directory |
diff --git a/linden/indra/newview/llappviewerwin32.cpp b/linden/indra/newview/llappviewerwin32.cpp index 1f042bd..2e74d0a 100644 --- a/linden/indra/newview/llappviewerwin32.cpp +++ b/linden/indra/newview/llappviewerwin32.cpp | |||
@@ -365,7 +365,8 @@ void create_console() | |||
365 | h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); | 365 | h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT); |
366 | fp = _fdopen( h_con_handle, "w" ); | 366 | fp = _fdopen( h_con_handle, "w" ); |
367 | *stderr = *fp; | 367 | *stderr = *fp; |
368 | setvbuf( stderr, NULL, _IONBF, 0 ); | 368 | setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7 |
369 | //_IOLBF is borked. | ||
369 | } | 370 | } |
370 | 371 | ||
371 | LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) : | 372 | LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) : |