mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[host] DXGI: copy based on the actual pitch
This commit is contained in:
parent
2ae9b479f6
commit
c0b67e7cb2
@ -397,13 +397,13 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||||||
|
|
||||||
m_width = desc.Width;
|
m_width = desc.Width;
|
||||||
m_height = desc.Height;
|
m_height = desc.Height;
|
||||||
const int pitch = m_width * 4;
|
|
||||||
|
|
||||||
frame.width = desc.Width;
|
frame.width = desc.Width;
|
||||||
frame.height = desc.Height;
|
frame.height = desc.Height;
|
||||||
frame.stride = desc.Width;
|
frame.stride = rect.Pitch / 4;
|
||||||
|
|
||||||
|
memcpySSE(frame.buffer, rect.pBits, min(frame.bufferSize, m_height * rect.Pitch));
|
||||||
|
|
||||||
memcpySSE(frame.buffer, rect.pBits, min(frame.bufferSize, m_height * pitch));
|
|
||||||
status = surface->Unmap();
|
status = surface->Unmap();
|
||||||
|
|
||||||
if (FAILED(status))
|
if (FAILED(status))
|
||||||
|
Loading…
Reference in New Issue
Block a user