Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make conhost act in VtIo mode earlier in startup #15298

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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