summaryrefslogtreecommitdiff
path: root/src/ui/paint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/paint.c')
-rw-r--r--src/ui/paint.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/paint.c b/src/ui/paint.c
index 869238d5..79adb7d1 100644
--- a/src/ui/paint.c
+++ b/src/ui/paint.c
@@ -89,17 +89,19 @@ void drawRect_Paint(const iPaint *d, iRect rect, int color) {
89 /* Keep the right/bottom edge visible in the window. */ 89 /* Keep the right/bottom edge visible in the window. */
90 if (br.x == d->dst->size.x) br.x--; 90 if (br.x == d->dst->size.x) br.x--;
91 if (br.y == d->dst->size.y) br.y--; 91 if (br.y == d->dst->size.y) br.y--;
92 const SDL_Point edges[] = { 92 SDL_Point edges[] = {
93 { left_Rect(rect), top_Rect(rect) }, 93 { left_Rect(rect), top_Rect(rect) },
94 { br.x, top_Rect(rect) }, 94 { br.x, top_Rect(rect) },
95 { br.x, br.y }, 95 { br.x, br.y },
96#if SDL_VERSION_ATLEAST(2, 0, 16) && defined (iPlatformApple)
97 { left_Rect(rect), br.y - 1 }, /* regression in SDL 2.0.16? */
98#else
99 { left_Rect(rect), br.y }, 96 { left_Rect(rect), br.y },
100#endif
101 { left_Rect(rect), top_Rect(rect) } 97 { left_Rect(rect), top_Rect(rect) }
102 }; 98 };
99#if SDL_VERSION_ATLEAST(2, 0, 16)
100 if (isOpenGLRenderer_Window()) {
101 /* A very curious regression in SDL 2.0.16. */
102 edges[3].y--;
103 }
104#endif
103 setColor_Paint_(d, color); 105 setColor_Paint_(d, color);
104 SDL_RenderDrawLines(renderer_Paint_(d), edges, iElemCount(edges)); 106 SDL_RenderDrawLines(renderer_Paint_(d), edges, iElemCount(edges));
105} 107}