summaryrefslogtreecommitdiff
path: root/src/ui/paint.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 08:46:49 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-03 08:46:49 +0300
commit47e7811386c9b06fd7b458e9afb527018ad80c03 (patch)
tree07e8b72a726cfae3060647d152ce797663332b30 /src/ui/paint.c
parent311a59df5552ae7ad52e1f001487112a300889c0 (diff)
Paint: Fixed build with older SDL versions
IssueID #259
Diffstat (limited to 'src/ui/paint.c')
-rw-r--r--src/ui/paint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/paint.c b/src/ui/paint.c
index 8843e2e2..faaf403d 100644
--- a/src/ui/paint.c
+++ b/src/ui/paint.c
@@ -79,8 +79,9 @@ void unsetClip_Paint(iPaint *d) {
79#if SDL_VERSION_ATLEAST(2, 0, 12) 79#if SDL_VERSION_ATLEAST(2, 0, 12)
80 SDL_RenderSetClipRect(renderer_Paint_(d), NULL); 80 SDL_RenderSetClipRect(renderer_Paint_(d), NULL);
81#else 81#else
82 const SDL_Rect winRect = { 0, 0, d->dst->root->rect.size.x, d->dst->root->rect.size.y }; 82 const iRect rect =
83 SDL_RenderSetClipRect(renderer_Paint_(d), &winRect); 83 current_Root() ? rect_Root(get_Root()) : (iRect){ zero_I2(), get_Window()->size };
84 SDL_RenderSetClipRect(renderer_Paint_(d), (const SDL_Rect *) &rect);
84#endif 85#endif
85} 86}
86 87