Skip to content

Commit

Permalink
PRE-MERGE microsoft#15298 Make conhost act in VtIo mode earlier in st…
Browse files Browse the repository at this point in the history
…artup
  • Loading branch information
zadjii-msft committed May 9, 2023
2 parents e293e15 + c42f5f1 commit 9642f22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/host/VtIo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ using namespace Microsoft::Console::Interactivity;

VtIo::VtIo() :
_initialized(false),
_objectsCreated(false),
_lookingForCursorPosition(false),
_IoMode(VtIoMode::INVALID)
{
Expand Down Expand Up @@ -224,13 +223,12 @@ VtIo::VtIo() :
}
CATCH_RETURN();

_objectsCreated = true;
return S_OK;
}

bool VtIo::IsUsingVt() const
{
return _objectsCreated;
return _initialized;
}

// Routine Description:
Expand All @@ -246,7 +244,7 @@ bool VtIo::IsUsingVt() const
[[nodiscard]] HRESULT VtIo::StartIfNeeded()
{
// If we haven't been set up, do nothing (because there's nothing to start)
if (!_objectsCreated)
if (!_initialized)
{
return S_FALSE;
}
Expand Down Expand Up @@ -514,7 +512,7 @@ void VtIo::EndResize()
// - <none>
void VtIo::EnableConptyModeForTests(std::unique_ptr<Microsoft::Console::Render::VtEngine> vtRenderEngine)
{
_objectsCreated = true;
_initialized = true;
_pVtRenderEngine = std::move(vtRenderEngine);
}
#endif
Expand Down
1 change: 0 additions & 1 deletion src/host/VtIo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ namespace Microsoft::Console::VirtualTerminal
VtIoMode _IoMode;

bool _initialized;
bool _objectsCreated;

bool _lookingForCursorPosition;

Expand Down

0 comments on commit 9642f22

Please sign in to comment.