Since some surface types are unhandled for now, OffScreenPlain is assumed.
Unused members of the DDSURFACEDESC2 structure are set to zero, so the bitperpixel is zero.
DDRAW_width_bpp_to_pitch is called with bpp 0 and apps are stopping on
assert(bpp != 0); /* keeps happening... */
At least WinDVD starts with this patch, will it be accepted until we implement other surface types ?
Index: ddraw/main.c =================================================================== RCS file: /home/wine/wine/dlls/ddraw/ddraw/main.c,v retrieving revision 1.40 diff -u -r1.40 main.c --- ddraw/main.c 11 May 2003 03:46:53 -0000 1.40 +++ ddraw/main.c 28 May 2003 22:03:46 -0000 @@ -525,6 +525,9 @@ if (!(ddsd.dwFlags & DDSD_PIXELFORMAT)) { ddsd.u4.ddpfPixelFormat = This->pixelformat; + } else { + if( !GET_BPP(ddsd)) + return DDERR_INVALIDPIXELFORMAT; }
if (!(ddsd.dwFlags & DDSD_PITCH))
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
On Thu, May 29, 2003 at 12:12:26AM +0200, Sylvain Petreolle wrote:
Since some surface types are unhandled for now, OffScreenPlain is assumed.
Unused members of the DDSURFACEDESC2 structure are set to zero, so the bitperpixel is zero.
DDRAW_width_bpp_to_pitch is called with bpp 0 and apps are stopping on
assert(bpp != 0); /* keeps happening... */
At least WinDVD starts with this patch, will it be accepted until we implement other surface types ?
Well, I think it would be better to check for the OVERLAY flag and return 'NOT SUPPORTED' in this case.
Could you try this and tell us if it works too ?
Lionel
PS: can't really send a patch as I am a bit far from my box :-)
Do you think I should check for the OVERLAY flag into CreateSurface or into createoffscreen ?
In case I put it in CreateSurface : - An unhandled case is asked - If this is an overlay, report not supported - Otherwise assume offscreenplain Am I right here ?
Well, I think it would be better to check for the OVERLAY flag and return 'NOT SUPPORTED' in this case.
Could you try this and tell us if it works too ?
Lionel
PS: can't really send a patch as I am a bit far from my box :-)
me too :) (at work now, we work on non-working days) I will try this afternoon.
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Do you think I should check for the OVERLAY flag into CreateSurface or into createoffscreen ?
I would put this before the 'else assume ...' case and would return the error here (so as the day we will support them, it would be just another case in the if / else if / else if / else code).
Something like that :
else if (ZBUFFER) { (...) } else if (OVERLAY) { return ERROR; } else { FIXME(....) }