[host] inline the implementation of min()

This commit is contained in:
arcnmx 2017-12-14 14:15:03 -05:00
parent 7691093121
commit d6fee6bf0b

View File

@ -402,7 +402,8 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
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();