miSprite Solution (?) Re: [ANNOUNCEMENT] Overlay and No DirectInput Test 4

John Fortin fortinj@attglobal.net
Wed Nov 8 19:19:00 GMT 2000


Suhaib and Harold,

I tracked down the 'bug' for the misprite problems.  

in 
miSpriteInitialize there is the following:

   #ifdef RENDER
       PictureScreenPtr    ps = GetPictureScreen(pScreen);
   #endif

where GetPictureScreen is defined as:

   #define GetPictureScreen(s)
((PictureScreenPtr)((s)->devPrivates[PictureScreenPrivateIndex].ptr))
                                                                           
^ 
I believe the problem is
here-----------------------------------------------^

PictureScreenPrivateIndex is never defined.

The place it is initialized is in render/picture.c:PictureInit().
      PictureScreenPrivateIndex = AllocateScreenPrivateIndex();

This is called by mipict.c:miPictureInit()
miPictureInit() is never used anywhere.

So when 'ps = GetPictureScreen(pScreen);' is called, ps points to
garbage.

However, if we undef RENDER, all the problems go away.

So, do we undef RENDER?  What is its purpose... Or notify someone that
the render function are broken.

John 


Harold Hunt wrote:
> 
> Oh, I notice that you mention the miSprite... functions.  That's probably
> due to the XFree86 build that I used to build XWin.exe - some patches to the
> tree a couple weeks ago caused a crash on startup of XWin.exe, I tracked the
> problem down to two pointers in one of the miSprite files, and I basically
> commented out enough of the cruft to get the crashes to stop.  I'm sure that
> there have been patches to the tree since then that fix the problem
> correctly, but I haven't updated my tree in awhile.
>


More information about the Cygwin-xfree mailing list