ConPTY: Do not wait for DA1 on startup (#20536)

A counterpart to #20510. After this commit you can spawn ConPTY
again without handling any queries and it'll (mostly) just work.

(cherry picked from commit bfc054685c)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zg2Hrj8
Service-Version: 1.25
This commit is contained in:
Leonard Hecker
2026-08-13 00:49:11 +02:00
committed by Dustin L. Howett
parent c60ed26bf9
commit f9066dca73

View File

@@ -206,11 +206,14 @@ bool VtIo::IsUsingVt() const
writer.Submit();
}
// NOTE: The PTY host may not be a terminal and may never respond
// to our DA1 request. It's better to not wait for a response.
if (_lookingForCursorPosition)
{
// Allow the input thread to momentarily gain the console lock.
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
const auto suspension = gci.SuspendLock();
_deviceAttributes = _pVtInputThread->WaitUntilDA1(3000);
_deviceAttributes = _pVtInputThread->WaitUntilDA1(1000);
}
}