summaryrefslogtreecommitdiff
path: root/src/ui/paint.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-15 19:50:22 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-15 19:50:22 +0300
commit32e7104dd03357dfd2032d200c528e88656daa69 (patch)
tree11184efde581fa6edd915bd727ea852db863df1f /src/ui/paint.c
parent9d7469ded746cbfa1e86c1ecd67e4a36f29f635b (diff)
parent0cbb300784aab7c8bb6bcbcfb044a48a5f9a19ac (diff)
Merge branch 'dev' into work/v1.7
Diffstat (limited to 'src/ui/paint.c')
-rw-r--r--src/ui/paint.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ui/paint.c b/src/ui/paint.c
index c575d5fc..79adb7d1 100644
--- a/src/ui/paint.c
+++ b/src/ui/paint.c
@@ -89,13 +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 { left_Rect(rect), br.y }, 96 { left_Rect(rect), br.y },
97 { left_Rect(rect), top_Rect(rect) } 97 { left_Rect(rect), top_Rect(rect) }
98 }; 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
99 setColor_Paint_(d, color); 105 setColor_Paint_(d, color);
100 SDL_RenderDrawLines(renderer_Paint_(d), edges, iElemCount(edges)); 106 SDL_RenderDrawLines(renderer_Paint_(d), edges, iElemCount(edges));
101} 107}