Lagrange [work/v1.11]

macOS: Workaround for an apparent SDL regression

=> 0df04130e8a6e3f2accdce7e51397db191fff09e

diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index a9a2d033..d6cc31cb 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -30,6 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 #include "keys.h"
 #include "touch.h"
 
+#include 
+
 struct Impl_LabelWidget {
     iWidget widget;
     iString srcLabel;
@@ -295,8 +297,16 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
         iRect frameRect = adjusted_Rect(rect, zero_I2(), init1_I2(-1));
         if (isButton) {
             iInt2 points[] = {
-                bottomLeft_Rect(frameRect), topLeft_Rect(frameRect), topRight_Rect(frameRect),
-                bottomRight_Rect(frameRect), bottomLeft_Rect(frameRect)
+                bottomLeft_Rect(frameRect),
+                topLeft_Rect(frameRect),
+                topRight_Rect(frameRect),
+#if SDL_VERSION_ATLEAST(2, 0, 16) && defined (iPlatformApple)
+                /* A very curious regression in SDL 2.0.16 on macOS. */
+                addX_I2(bottomRight_Rect(frameRect), -1),
+#else
+                bottomRight_Rect(frameRect),
+#endif
+                bottomLeft_Rect(frameRect)
             };
             drawLines_Paint(&p, points + 2, 3, frame2);
             drawLines_Paint(
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.11/cdiff/0df04130e8a6e3f2accdce7e51397db191fff09e
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
53.056008 milliseconds
Gemini-to-HTML Time
0.186656 milliseconds

This content has been proxied by September (ba2dc).