From 1135f154b7eb490bf34e6309c619ba4e84afc701 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 14 Apr 2017 15:41:36 +0200 Subject: [PATCH] - fixed: For Screen.SetClipRect, -1 is a valid value for width and height so it must not be clamped away. --- src/v_draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 314a0fb9af..ea589cbfcd 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -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)