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
commit e6dff86d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

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);