1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Merge pull request #11669 from IntelOrca/fix/11667-no-tty-console

Fix #11667: Memory dumps being generated every time the game is closed
This commit is contained in:
Duncan
2020-05-08 19:25:44 +01:00
committed by GitHub

View File

@@ -7,6 +7,11 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
// Ignore isatty warning on WIN32
#ifndef _CRT_NONSTDC_NO_WARNINGS
# define _CRT_NONSTDC_NO_WARNINGS
#endif
#include "../Context.h"
#include "../OpenRCT2.h"
#include "../platform/Platform2.h"
@@ -19,6 +24,12 @@ using namespace OpenRCT2;
void StdInOutConsole::Start()
{
// Only start if stdin is a TTY
if (!isatty(fileno(stdin)))
{
return;
}
std::thread replThread([this]() -> void {
linenoise::SetMultiLine(true);
linenoise::SetHistoryMaxLen(32);