git: 1158bb6541df - 2023Q2 - graphics/grafx2: Fix TTF font rendering
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Apr 2023 06:42:11 UTC
The branch 2023Q2 has been updated by ehaupt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=1158bb6541df5d3f68c5beff064e80257eef814f
commit 1158bb6541df5d3f68c5beff064e80257eef814f
Author: Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2023-04-13 06:37:02 +0000
Commit: Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2023-04-13 06:42:06 +0000
graphics/grafx2: Fix TTF font rendering
PR: 270781
Reported by: tobias.rehbein@web.de
(cherry picked from commit 3ad1498338bad3d6c51bff6984ca6493fe8d8da6)
---
graphics/grafx2/Makefile | 1 +
graphics/grafx2/files/patch-sdlscreen.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/graphics/grafx2/Makefile b/graphics/grafx2/Makefile
index e953bfbb61dc..220dc2a2ab41 100644
--- a/graphics/grafx2/Makefile
+++ b/graphics/grafx2/Makefile
@@ -1,6 +1,7 @@
PORTNAME= grafx2
PORTVERSION= 2.8
DISTVERSIONSUFFIX= .3091-HEAD-src
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://pulkomandy.tk/projects/GrafX2/downloads/ \
LOCAL/ehaupt
diff --git a/graphics/grafx2/files/patch-sdlscreen.c b/graphics/grafx2/files/patch-sdlscreen.c
new file mode 100644
index 000000000000..6f75258a549a
--- /dev/null
+++ b/graphics/grafx2/files/patch-sdlscreen.c
@@ -0,0 +1,29 @@
+--- sdlscreen.c.orig 2023-04-11 14:41:38 UTC
++++ sdlscreen.c
+@@ -373,17 +373,11 @@ byte * Surface_to_bytefield(SDL_Surface *source, byte
+ byte *src;
+ byte *dest_ptr;
+ int y;
+- int remainder;
+
+ // Support seulement des images 256 couleurs
+ if (source->format->BytesPerPixel != 1)
+ return NULL;
+
+- if (source->w & 3)
+- remainder=4-(source->w&3);
+- else
+- remainder=0;
+-
+ if (dest==NULL)
+ dest=(byte *)malloc(source->w*source->h);
+
+@@ -393,7 +387,7 @@ byte * Surface_to_bytefield(SDL_Surface *source, byte
+ {
+ memcpy(dest_ptr, src,source->w);
+ dest_ptr += source->w;
+- src += source->w + remainder;
++ src += source->pitch;
+ }
+ return dest;
+