2019-05-03 00:29:04 +02:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
#include "precomp.h"
|
|
|
|
|
|
|
|
#include "globals.h"
|
|
|
|
|
|
|
|
#pragma hdrstop
|
|
|
|
|
|
|
|
CONSOLE_INFORMATION& Globals::getConsoleInformation()
|
|
|
|
{
|
|
|
|
return ciConsoleInformation;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Globals::IsHeadless() const
|
|
|
|
{
|
|
|
|
return launchArgs.IsHeadless();
|
|
|
|
}
|
2020-01-29 17:33:06 +01:00
|
|
|
|
|
|
|
#ifdef UNIT_TESTING
|
|
|
|
// Method Description:
|
|
|
|
// - This is a test helper method. It can be used to trick us into responding
|
|
|
|
// true to `IsHeadless`, which will cause the console host to act in conpty
|
|
|
|
// mode.
|
|
|
|
// Arguments:
|
|
|
|
// - <none>
|
|
|
|
// Return Value:
|
|
|
|
// - <none>
|
|
|
|
void Globals::EnableConptyModeForTests()
|
|
|
|
{
|
|
|
|
launchArgs.EnableConptyModeForTests();
|
|
|
|
getConsoleInformation().GetVtIo()->EnableConptyModeForTests();
|
|
|
|
}
|
|
|
|
#endif
|