Subject: Re: mmap problems
To: Chuck Silvers <>
From: Jared D. McNeill <>
List: tech-x11
Date: 05/27/2001 22:51:05
On Sun, 27 May 2001, Chuck Silvers wrote:

> hi,
> if "offset" is a signed 32-bit variable then what's happening is that
> it's being sign-extended what cast to off_t, making the offset negative,
> which isn't what you want.  make sure that the upper bits of the value
> passed to mmap() as the offset are zero.

You're my hero! :-)

In xsrc/xc/lib/Xxf86dga/XF86DGA.c, in XF86DGAGetVideo(), I changed the line:
   int offset, fd;
to read:
   int fd;
   unsigned long offset;

The libXxf86dga code compiles (with a warning), but snes9x works like a
charm with DGA (and as a result, full-screen mode works now too).

I'm cc'ing tech-x11 in hopes that someone who can actually fix this
properly will have a look. I'm 99.9% sure that this will let xmame go
full-screen as well :-)

Thanks a bunch,