WineD3D: ddraw surfaces don't have a device palette 3/5

Roderick Colenbrander thunderbird2k at gmx.net
Thu Feb 21 15:10:14 CST 2008


Hi,

Earlier this week Alexander added a directx version check to d3dfmt_init_palette. The difference between D3D8/9 and DirectDraw is that in the first case the palette is a property of the device while for DirectDraw it is a property of the surface.

The confusing thing was that some games DirectDraw games like Red Alert for some reason entered the device palette code. We tried to find it but didn't know and for that reason a dxVersion check was the most obvious fix.

Today by accident I found the problem. It appears to happen in cases in which an offscreen surface is rendered to the screen. The offscreen surface doesn't need a palette. The way our code is written, we need a palette at upload time, so for that reason temporarily assign the 'destination its palette' to the source surface.

I have tested this with all my P8 software (StarCraft, Red Alert, DirectX SDK samples and more) and all appear to work correctly and none of them enters the device palette code. This is the proper fix.

Regards,
Roderick Colenbrander
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-In-DirectDraw-a-palette-is-a-property-of-a-surface-w.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080221/eea08e47/attachment.bin 


More information about the wine-patches mailing list