1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Allow disabling of REPL (#25071)

This commit is contained in:
Michał Janiszewski
2025-08-30 12:32:16 +02:00
committed by GitHub
parent 292824ca25
commit 1787b1de69

View File

@@ -16,6 +16,7 @@
#include "../platform/Platform.h"
#include "../scripting/ScriptEngine.h"
#include <cstdlib>
#include <linenoise.hpp>
// Ignore isatty warning on WIN32
@@ -31,6 +32,12 @@ void StdInOutConsole::Start()
return;
}
// Allow user to disable the console REPL. Setting this environment variable to any value will prevent REPL from starting.
if (getenv("OPENRCT2_NO_REPL"))
{
return;
}
std::thread replThread([this]() -> void {
linenoise::SetMultiLine(true);
linenoise::SetHistoryMaxLen(32);