[5/6] ddraw: fix palette copying when destination palette is NULL

Stefan Dösinger stefan at codeweavers.com
Sun Dec 30 18:08:18 CST 2007

Am Montag, 31. Dezember 2007 03:04:02 schrieb Alexander Dorofeyev:
> I think there's a bug here. If pal == NULL that implies (because of
> preceding code) that wine_pal == NULL. So it's setting a NULL wined3d
> palette to the destination wined3d surface, yet increases reference counter
> on source palette. I guess it should pass source wined3d palette here, to
> make any sense. ---
>     dlls/ddraw/texture.c |    2 +-
>     1 files changed, 1 insertions(+), 1 deletions(-)
I am not sure about this, but honestly I don't really know much about 
IDirect3DTexture2::Load is supposed to work. When I ported ddraw.dll to use 
wined3d I only did routine adjustments to the code to cope with the wined3d 
objects. I think Lionel Ulmer wrote the original code, maybe he can comment 
on it?

I think we really need a few unit tests for this method. From the docs, it 
seems that this method is related to IDirect3DDevice9::LoadTexture, maybe we 
can map it to WineD3D's loadtexture.

More information about the wine-patches mailing list