mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-03 17:56:27 +01:00
(svn r1083) Fix: the console "script" command saves all output to the textfile, not only printf stuff (sign_de)
This commit is contained in:
parent
7196860373
commit
a94da5937c
12
console.c
12
console.c
@ -399,6 +399,12 @@ void IConsolePrint(uint16 color_code, const char* string)
|
|||||||
}
|
}
|
||||||
free(_ex);
|
free(_ex);
|
||||||
|
|
||||||
|
if (_iconsole_output_file != NULL) {
|
||||||
|
// if there is an console output file ... also print it there
|
||||||
|
fwrite(string, strlen(string), 1, _iconsole_output_file);
|
||||||
|
fwrite("\n", 1, 1, _iconsole_output_file);
|
||||||
|
}
|
||||||
|
|
||||||
if (_iconsole_win != NULL) SetWindowDirty(_iconsole_win);
|
if (_iconsole_win != NULL) SetWindowDirty(_iconsole_win);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,12 +420,6 @@ void CDECL IConsolePrintF(uint16 color_code, const char* s, ...)
|
|||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
IConsolePrint(color_code, buf);
|
IConsolePrint(color_code, buf);
|
||||||
|
|
||||||
if (_iconsole_output_file != NULL) {
|
|
||||||
// if there is an console output file ... also print it there
|
|
||||||
fwrite(buf, len, 1, _iconsole_output_file);
|
|
||||||
fwrite("\n", 1, 1, _iconsole_output_file);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IConsoleDebug(const char* string)
|
void IConsoleDebug(const char* string)
|
||||||
|
Loading…
Reference in New Issue
Block a user