Framebuffer blit: Clip src rectangle as well

This commit is contained in:
Henrik Rydgård 2018-11-05 00:27:29 +01:00
parent 7561af3735
commit 67d6e3d384

View File

@ -468,6 +468,13 @@ void FramebufferManagerVulkan::BlitFramebuffer(VirtualFramebuffer *dst, int dstX
if (dstY + h > dst->bufferHeight) {
h -= dstY + h - dst->bufferHeight;
}
if (srcX + w > src->bufferWidth) {
w -= srcX + w - src->bufferWidth;
}
if (srcY + h > src->bufferHeight) {
h -= srcY + h - src->bufferHeight;
}
if (w == 0 || h == 0)
return;