mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 23:07:18 +00:00
[host] [Patch 1/2] fix copy of padded resolutions
This commit is contained in:
parent
667aed635d
commit
2a86339b1d
@ -735,19 +735,10 @@ GrabStatus Capture::DXGI::GrabFrameRaw(FrameInfo & frame)
|
||||
return GRAB_STATUS_ERROR;
|
||||
}
|
||||
|
||||
frame.pitch = m_width * 4;
|
||||
frame.stride = m_width;
|
||||
frame.pitch = mapping.RowPitch;
|
||||
frame.stride = mapping.RowPitch / 4;
|
||||
|
||||
if (frame.pitch == mapping.RowPitch)
|
||||
memcpySSE(frame.buffer, mapping.pData, frame.pitch * m_height);
|
||||
else
|
||||
for(unsigned int y = 0; y < m_height; ++y)
|
||||
memcpySSE(
|
||||
(uint8_t *)frame.buffer + (frame.pitch * y),
|
||||
(uint8_t *)mapping.pData + (mapping.RowPitch * y),
|
||||
frame.pitch
|
||||
);
|
||||
|
||||
m_deviceContext->Unmap(m_texture[0], 0);
|
||||
|
||||
return GRAB_STATUS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user