diff options
author | mycroft <mycroft@pkgsrc.org> | 2002-02-20 17:20:59 +0000 |
---|---|---|
committer | mycroft <mycroft@pkgsrc.org> | 2002-02-20 17:20:59 +0000 |
commit | b14845c787b8d1d32bb9dffc1a587a2e2d8748ba (patch) | |
tree | 7d63432ea774d6f14c49dc580bbaa55e21307dd8 /emulators/xmame/patches | |
parent | 9c65db9967e6151ee74072f70b3b1d216add5f01 (diff) | |
download | pkgsrc-b14845c787b8d1d32bb9dffc1a587a2e2d8748ba.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.)
Diffstat (limited to 'emulators/xmame/patches')
-rw-r--r-- | emulators/xmame/patches/patch-af | 24 |
1 files changed, 24 insertions, 0 deletions
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); + |