mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[host] inline the implementation of min()
This commit is contained in:
parent
7691093121
commit
d6fee6bf0b
@ -401,8 +401,9 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
||||
frame.width = desc.Width;
|
||||
frame.height = desc.Height;
|
||||
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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user