Codechange: put stack variables in global variables for gamelog/crashlog

This commit is contained in:
Rubidium
2023-01-27 22:40:30 +01:00
committed by rubidium42
parent ed7685910d
commit d51d08ddcb
7 changed files with 21 additions and 55 deletions

View File

@@ -10,6 +10,7 @@
#ifndef GAMELOG_H
#define GAMELOG_H
#include <functional>
#include "newgrf_config.h"
/** The actions we log. */
@@ -32,13 +33,7 @@ void GamelogStopAnyAction();
void GamelogFree(struct LoggedAction *gamelog_action, uint gamelog_actions);
void GamelogReset();
/**
* Callback for printing text.
* @param s The string to print.
*/
typedef void GamelogPrintProc(const char *s);
void GamelogPrint(GamelogPrintProc *proc); // needed for WIN32 crash.log
void GamelogPrint(std::function<void(const char *)> proc);
void GamelogPrintDebug(int level);
void GamelogPrintConsole();