Getting DXBall to run
Hans Leidekker
hans at it.vu.nl
Fri May 16 10:02:35 CDT 2003
Hi,
I have this old breakout style game called DXBall (I think
it's a DirectX 2 game) that runs flawlessly but for one
page fault after the second startup screen, right before
the first level starts. You can download the game here:
http://www.magicwandsoft.com/games/dxball/download.html
I traced it down to dlls/ddraw/dsurface/dib.c:create_dib where
it says:
if (!This->surface_desc.lpSurface) {
This->surface_desc.lpSurface = priv->dib.bitmap_data;
This->surface_desc.dwFlags |= DDSD_LPSURFACE;
}
I don't see why This->surface_desc.lpSurface is being tested
here before doing the assignment since up in the function
there's this assert statement:
assert(This->surface_desc.lpSurface != NULL);
And as far as I can tell there's nothing in between that could
change the value of This->surface_desc.lpSurface, so this code
will never be reached. Some extra traces confirm that this is
the case.
If I make the assignment unconditional the game starts to run,
but I'm not really sure if this fix hides another bug or not.
Maybe some DirectX guru can tell right away?
-Hans
Changelog:
Remove superfluous NULL check
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ddraw-dib.diff
Type: text/x-diff
Size: 705 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20030516/83247881/ddraw-dib.bin
More information about the wine-patches
mailing list