[host] Prevent NvFBC from stalling

NvFBC will wait forever for a change if nothing has changed, instead use
a timeout so that if the guest has re-connected it doesn't stall waiting
for a guest update.
This commit is contained in:
Geoffrey McRae 2017-11-17 19:55:54 +11:00
parent f91b837172
commit 12617479d4

View File

@ -154,7 +154,8 @@ bool NvFBC::Initialize(CaptureOptions * options)
ZeroMemory(&m_grabFrameParams, sizeof(NVFBC_TOSYS_GRAB_FRAME_PARAMS));
ZeroMemory(&m_grabInfo, sizeof(NvFBCFrameGrabInfo));
m_grabFrameParams.dwVersion = NVFBC_TOSYS_GRAB_FRAME_PARAMS_VER;
m_grabFrameParams.dwFlags = NVFBC_TOSYS_NOFLAGS;
m_grabFrameParams.dwFlags = NVFBC_TOSYS_WAIT_WITH_TIMEOUT;
m_grabFrameParams.dwWaitTime = 100;
m_grabFrameParams.eGMode = NVFBC_TOSYS_SOURCEMODE_FULL;
m_grabFrameParams.dwStartX = 0;
m_grabFrameParams.dwStartY = 0;