void I_PrintStr(const char *cp) { if (ConWindowHidden) { bufferedConsoleStuff.Push(cp); DoPrintStr(cp, NULL, StdOut); } else { DoPrintStr(cp, ConWindow, StdOut); } }
void I_FlushBufferedConsoleStuff() { for (unsigned i = 0; i < bufferedConsoleStuff.Size(); i++) { DoPrintStr(bufferedConsoleStuff[i], ConWindow, NULL); } bufferedConsoleStuff.Clear(); }
void I_PrintStr(const char *cp) { if (con_debugoutput) { // Strip out any color escape sequences before writing to debug output char * copy = new char[strlen(cp)+1]; const char * srcp = cp; char * dstp = copy; while (*srcp != 0) { if (*srcp!=0x1c && *srcp!=0x1d && *srcp!=0x1e && *srcp!=0x1f) { *dstp++=*srcp++; } else { if (srcp[1]!=0) srcp+=2; else break; } } *dstp=0; OutputDebugStringA(copy); delete [] copy; } if (ConWindowHidden) { bufferedConsoleStuff.Push(cp); DoPrintStr(cp, NULL, StdOut); } else { DoPrintStr(cp, ConWindow, StdOut); } }