mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 05:53:40 +00:00
[host] dxgi: fixed frame update regression
This commit is contained in:
parent
2d746cbfd4
commit
3d9230ac93
@ -416,10 +416,6 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
return GRAB_STATUS_ERROR;
|
||||
}
|
||||
|
||||
TRACE_START("DXGI Memory Copy");
|
||||
// wake up the copy threads
|
||||
m_memcpy.Wake();
|
||||
|
||||
ID3D11Texture2DPtr src(res);
|
||||
res.Release();
|
||||
if (!src)
|
||||
@ -431,6 +427,12 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
m_deviceContext->CopyResource(m_texture, src);
|
||||
src.Release();
|
||||
|
||||
if (m_surfaceMapped)
|
||||
{
|
||||
m_deviceContext->Unmap(m_texture, 0);
|
||||
m_surfaceMapped = false;
|
||||
}
|
||||
|
||||
status = m_deviceContext->Map(m_texture, 0, D3D11_MAP_READ, 0, &m_mapping);
|
||||
if (FAILED(status))
|
||||
{
|
||||
@ -440,6 +442,10 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
}
|
||||
m_surfaceMapped = true;
|
||||
|
||||
TRACE_START("DXGI Memory Copy");
|
||||
// wake up the copy threads
|
||||
m_memcpy.Wake();
|
||||
|
||||
frame.width = m_width;
|
||||
frame.height = m_height;
|
||||
frame.pitch = m_mapping.RowPitch;
|
||||
|
Loading…
Reference in New Issue
Block a user