From 0df04130e8a6e3f2accdce7e51397db191fff09e Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Sat, 14 Aug 2021 17:42:25 +0300

Subject: [PATCH 1/1] macOS: Workaround for an apparent SDL regression

On macOS with SDL 2.0.16, there's a problem with the bottom right corner of a rectangle drawn as a line strip being off by one.


src/ui/labelwidget.c | 14 ++++++++++++--

1 file changed, 12 insertions(+), 2 deletions(-)

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 <SDL_version.h>

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[] = {

+#if SDL_VERSION_ATLEAST(2, 0, 16) && defined (iPlatformApple)

+#else

+#endif

         };

         drawLines_Paint(&p, points + 2, 3, frame2);

         drawLines_Paint(

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/dev/patch/0df04130e8a6e3f2accdce7e51397db191fff09e.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
28.011744 milliseconds
Gemini-to-HTML Time
1.125544 milliseconds

This content has been proxied by September (ba2dc).