- fixed: For Screen.SetClipRect, -1 is a valid value for width and height so it must not be clamped away.

This commit is contained in:
Christoph Oelckers 2017-04-14 15:41:36 +02:00
parent 47bb29bac6
commit 1135f154b7

View file

@ -186,9 +186,9 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
void DCanvas::SetClipRect(int x, int y, int w, int h)
{
clipleft = clamp(x, 0, GetWidth());
clipwidth = clamp(w, 0, GetWidth() - x);
clipwidth = clamp(w, -1, GetWidth() - x);
cliptop = clamp(y, 0, GetHeight());
clipheight = clamp(h, 0, GetHeight() - y);
clipheight = clamp(h, -1, GetHeight() - y);
}
DEFINE_ACTION_FUNCTION(_Screen, SetClipRect)