diff options
Diffstat (limited to 'src/ui/paint.c')
-rw-r--r-- | src/ui/paint.c | 12 |
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 | } |