DirectDrawRenderer - opengl non power of 2 windows

Nathan Williams nathan.andrew.williams at
Sat Mar 17 18:30:46 CDT 2007

I'm working on fixing the menus in carmageddon and I have a question.

I have set the DirectDrawRenderer to opengl and it all crashes (where
it works under gdi, just displays incorrectly).

Now I traced the problem down to:

The loop at:;f=dlls/wined3d/surface.c;h=1f4ddb616c4dbc6c5e11723960a308ee8a046ccd;hb=HEAD#l1576

loops over the surface height and width, the only problem is that the
surface height appears to be scaled up to the next power of 2.

As carmageddon runs in 320x200 the loop tries to iterate over 320x256
and subsequently crashes with a page fault in winedbg.

Is there anyway to get the original window's dimensions and perhaps
feed that to the function & hence loop, instead?
Or should I just accept that carmageddon will forever be restricted to
the gdi renderer? :P


More information about the wine-devel mailing list