mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 23:07:18 +00:00
[dxgi] update DXGI to use timeout return value
This commit is contained in:
parent
343983d9af
commit
af143bdd82
@ -759,25 +759,9 @@ GrabStatus Capture::DXGI::GrabFrameRaw(FrameInfo & frame, struct CursorInfo & cu
|
|||||||
ID3D11Texture2DPtr src;
|
ID3D11Texture2DPtr src;
|
||||||
bool timeout;
|
bool timeout;
|
||||||
|
|
||||||
while(true)
|
result = GrabFrameTexture(frame, cursor, src, timeout);
|
||||||
{
|
if (timeout)
|
||||||
result = GrabFrameTexture(frame, cursor, src, timeout);
|
return GRAB_STATUS_TIMEOUT;
|
||||||
if (timeout)
|
|
||||||
{
|
|
||||||
if (!m_surfaceMapped)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// send the last frame again if we timeout to prevent the client stalling on restart
|
|
||||||
frame.pitch = m_mapping.RowPitch;
|
|
||||||
frame.stride = m_mapping.RowPitch >> 2;
|
|
||||||
|
|
||||||
unsigned int size = m_height * m_mapping.RowPitch;
|
|
||||||
memcpySSE(frame.buffer, m_mapping.pData, LG_MIN(size, frame.bufferSize));
|
|
||||||
return GRAB_STATUS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result != GRAB_STATUS_OK)
|
if (result != GRAB_STATUS_OK)
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user