Clip dirty region to be within viewport in MarkViewportDirty

This commit is contained in:
Jonathan G Rennison
2018-05-26 00:47:02 +01:00
parent e6e5a96ed3
commit 7f32bb34ac

View File

@@ -2822,9 +2822,11 @@ static void MarkViewportDirty(const ViewPort * const vp, int left, int top, int
right -= vp->virtual_left;
if (right <= 0) return;
right = min(right, vp->virtual_width);
bottom -= vp->virtual_top;
if (bottom <= 0) return;
bottom = min(bottom, vp->virtual_height);
left = max(0, left - vp->virtual_left);