1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 08:59:09 +00:00

Codefix: don't send desync=0 log messages to commands.log (#12517)

They are only used during replay, and you want to see those in
the console; not in the log.
This commit is contained in:
Patric Stout
2024-04-17 21:51:36 +02:00
committed by glx22
parent ebc30425cc
commit 5871b66195

View File

@@ -110,7 +110,7 @@ void DumpDebugFacilityNames(std::back_insert_iterator<std::string> &output_itera
*/
void DebugPrint(const char *category, int level, const std::string &message)
{
if (strcmp(category, "desync") == 0) {
if (strcmp(category, "desync") == 0 && level != 0) {
static FILE *f = FioFOpenFile("commands-out.log", "wb", AUTOSAVE_DIR);
if (f == nullptr) return;