1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-22 00:29:41 +02:00

svgalib: fix (?) gl_fillbox & friends when used in 32-bit video modes

This commit is contained in:
David Kühling 2011-01-29 14:48:54 +01:00
parent 9c4f17115c
commit 8b59d50ab7
2 changed files with 30 additions and 1 deletions

View File

@ -136,5 +136,5 @@ $(eval $(call BuildPackage,svgalib-demo))
# The following comments configure the Emacs editor. Just ignore them.
# Local Variables:
# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/svgalib/compile -j2 V=99"
# compile-command: "cd ~/src/nanonote/svgalib-1.4.3 && ~/bin/quilt-export target && make -C ~/h/src/qi/openwrt-xburst package/svgalib/compile -j2 V=99"
# End:

View File

@ -0,0 +1,29 @@
Index: svgalib-1.4.3/gl/inlstring.h
===================================================================
--- svgalib-1.4.3.orig/gl/inlstring.h 2011-01-29 14:33:47.000000000 +0100
+++ svgalib-1.4.3/gl/inlstring.h 2011-01-29 14:42:07.000000000 +0100
@@ -8,9 +8,22 @@
#define __memcpy_conventional(dst,src,n) memcpy((dst),(src),(n))
#define __memcpyb(dst,src,n) memcpy((dst),(src),(n))
#define __memsetb(dst,c,n) memset((dst),(c),(n))
-#define __memsetlong(dst,c,n) memset((dst),(c),(n))
#define __memset(dst,c,n) memset((dst),(c),(n))
-#define __memset2(dst,c,n) memset((dst),(c),2*(n))
+static void __memsetlong(void *ptr, int c, int n)
+{
+ unsigned *dst = (unsigned*)ptr;
+ int i;
+ for (i = 0; i < n; i++)
+ dst[i] = c;
+}
+static void __memset2(void *ptr, int c, int n)
+{
+ unsigned short *dst = (unsigned short*)ptr;
+ int i;
+ for (i = 0; i < n; i++)
+ dst[i] = c;
+}
+/* todo: */
#define __memset3(dst,c,n) memset((dst),(c),3*(n))
#else