summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/paint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/paint.c b/src/ui/paint.c
index 36e3f703..857bf20c 100644
--- a/src/ui/paint.c
+++ b/src/ui/paint.c
@@ -67,6 +67,11 @@ void setClip_Paint(iPaint *d, iRect rect) {
67 rect.pos.y -= off; 67 rect.pos.y -= off;
68 rect.size.y = iMax(0, rect.size.y + off); 68 rect.size.y = iMax(0, rect.size.y + off);
69 } 69 }
70 if (rect.pos.x < 0) {
71 const int off = rect.pos.x;
72 rect.pos.x -= off;
73 rect.size.x = iMax(0, rect.size.x + off);
74 }
70 SDL_RenderSetClipRect(renderer_Paint_(d), (const SDL_Rect *) &rect); 75 SDL_RenderSetClipRect(renderer_Paint_(d), (const SDL_Rect *) &rect);
71} 76}
72 77