mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-05-17 03:51:17 +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;
|
return GRAB_STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE_START("DXGI Memory Copy");
|
|
||||||
// wake up the copy threads
|
|
||||||
m_memcpy.Wake();
|
|
||||||
|
|
||||||
ID3D11Texture2DPtr src(res);
|
ID3D11Texture2DPtr src(res);
|
||||||
res.Release();
|
res.Release();
|
||||||
if (!src)
|
if (!src)
|
||||||
@ -431,6 +427,12 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||||||
m_deviceContext->CopyResource(m_texture, src);
|
m_deviceContext->CopyResource(m_texture, src);
|
||||||
src.Release();
|
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);
|
status = m_deviceContext->Map(m_texture, 0, D3D11_MAP_READ, 0, &m_mapping);
|
||||||
if (FAILED(status))
|
if (FAILED(status))
|
||||||
{
|
{
|
||||||
@ -440,6 +442,10 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||||||
}
|
}
|
||||||
m_surfaceMapped = true;
|
m_surfaceMapped = true;
|
||||||
|
|
||||||
|
TRACE_START("DXGI Memory Copy");
|
||||||
|
// wake up the copy threads
|
||||||
|
m_memcpy.Wake();
|
||||||
|
|
||||||
frame.width = m_width;
|
frame.width = m_width;
|
||||||
frame.height = m_height;
|
frame.height = m_height;
|
||||||
frame.pitch = m_mapping.RowPitch;
|
frame.pitch = m_mapping.RowPitch;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user