summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormycroft <mycroft>2002-02-20 17:20:59 +0000
committermycroft <mycroft>2002-02-20 17:20:59 +0000
commit268b57925b7359634e129680898e964fd378093b (patch)
tree7d63432ea774d6f14c49dc580bbaa55e21307dd8
parentd5827388b409c7fb874de16589fdcc6047745fdd (diff)
downloadpkgsrc-268b57925b7359634e129680898e964fd378093b.tar.gz
Use XDGAFillRectangle() to clear the display if possible, avoiding issues with
using memset() on mapped video buffers. (The memset() fails on PPC due to the use of dcbz, for example.)
-rw-r--r--emulators/xmame/distinfo3
-rw-r--r--emulators/xmame/patches/patch-af24
2 files changed, 26 insertions, 1 deletions
diff --git a/emulators/xmame/distinfo b/emulators/xmame/distinfo
index 33e95c68ba9..627633e90b1 100644
--- a/emulators/xmame/distinfo
+++ b/emulators/xmame/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2002/02/06 22:01:25 kristerw Exp $
+$NetBSD: distinfo,v 1.19 2002/02/20 17:20:59 mycroft Exp $
SHA1 (xmame-0.58.1.tar.bz2) = c688c7de85bb9e8291aed5b8ccae9e531219ff73
Size (xmame-0.58.1.tar.bz2) = 5370441 bytes
@@ -6,3 +6,4 @@ SHA1 (patch-aa) = be131167296c50e3aea55da46288dfc16bf3ad8e
SHA1 (patch-ab) = b6bb3acba452b91c8b9dd946531e9195d5d196fb
SHA1 (patch-ac) = 08dda8c365c9891e1f54ef622325015a38cb9758
SHA1 (patch-ae) = ccc133c1a597a4f9f4eee3d189fc917c60d2e958
+SHA1 (patch-af) = 7f23cba358e2a802ffe22332e42df44bb84cbfbc
diff --git a/emulators/xmame/patches/patch-af b/emulators/xmame/patches/patch-af
new file mode 100644
index 00000000000..784c4365149
--- /dev/null
+++ b/emulators/xmame/patches/patch-af
@@ -0,0 +1,24 @@
+$NetBSD: patch-af,v 1.5 2002/02/20 17:21:00 mycroft Exp $
+--- src/unix/video-drivers/xf86_dga2.c.orig Wed Feb 6 03:33:31 2002
++++ src/unix/video-drivers/xf86_dga2.c Wed Feb 20 17:14:59 2002
+@@ -405,9 +405,17 @@
+ while(XDGAGetViewportStatus(display, xf86ctx.screen))
+ ;
+
+- memset(xf86ctx.base_addr, 0,
+- xf86ctx.device->mode.bytesPerScanline
+- * xf86ctx.device->mode.imageHeight);
++ if (xf86ctx.device->mode.flags & XDGASolidFillRect) {
++ XDGAFillRectangle(display, xf86ctx.screen, 0, 0,
++ DisplayWidth(display, xf86ctx.screen),
++ DisplayHeight(display, xf86ctx.screen),
++ BlackPixel(display, xf86ctx.screen));
++ XDGASync(display, xf86ctx.screen);
++ } else {
++ memset(xf86ctx.base_addr, 0,
++ xf86ctx.device->mode.bytesPerScanline
++ * xf86ctx.device->mode.imageHeight);
++ }
+
+ effect_init2(bitmap_depth, depth, xf86ctx.width);
+