mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 21:47:23 +00:00
[host] inline the implementation of min()
This commit is contained in:
parent
7691093121
commit
d6fee6bf0b
@ -402,7 +402,8 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||||||
frame.height = desc.Height;
|
frame.height = desc.Height;
|
||||||
frame.stride = rect.Pitch / 4;
|
frame.stride = rect.Pitch / 4;
|
||||||
|
|
||||||
memcpySSE(frame.buffer, rect.pBits, min(frame.bufferSize, m_height * rect.Pitch));
|
unsigned int size = m_height * rect.Pitch;
|
||||||
|
memcpySSE(frame.buffer, rect.pBits, size < frame.bufferSize ? size : frame.bufferSize);
|
||||||
|
|
||||||
status = surface->Unmap();
|
status = surface->Unmap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user