mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-05 07:38:13 +00:00
[host] flag paused when waiting for sec desktop
This commit is contained in:
@@ -238,15 +238,18 @@ bool Service::Process()
|
||||
|
||||
case GRAB_STATUS_REINIT:
|
||||
DEBUG_INFO("ReInitialize Requested");
|
||||
|
||||
*flags |= KVMFR_HEADER_FLAG_PAUSED;
|
||||
if(WTSGetActiveConsoleSessionId() != m_consoleSessionID)
|
||||
{
|
||||
DEBUG_INFO("User switch detected, waiting to regain control");
|
||||
*flags |= KVMFR_HEADER_FLAG_PAUSED;
|
||||
while (WTSGetActiveConsoleSessionId() != m_consoleSessionID)
|
||||
Sleep(100);
|
||||
*flags &= ~KVMFR_HEADER_FLAG_PAUSED;
|
||||
}
|
||||
|
||||
while (!m_capture->CanInitialize())
|
||||
Sleep(100);
|
||||
|
||||
if (!m_capture->ReInitialize())
|
||||
{
|
||||
DEBUG_ERROR("ReInitialize Failed");
|
||||
@@ -259,6 +262,8 @@ bool Service::Process()
|
||||
return false;
|
||||
}
|
||||
|
||||
*flags &= ~KVMFR_HEADER_FLAG_PAUSED;
|
||||
|
||||
// re-init request should not count towards a failure to capture
|
||||
--i;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user