Commit f84589ea authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: Reload the palette on a color key change. This fixes the ddex4/ddex5…

wined3d: Reload the palette on a color key change. This fixes the ddex4/ddex5 samples from the dx7 sdk.
parent 1b78457b
......@@ -2102,11 +2102,18 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO
/* To perform the color key conversion we need a sysmem copy of
* the surface. Make sure we have it
*/
IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL);
/* Make sure the texture is reloaded because of the color key change, this kills performance though :( */
/* TODO: This is not necessarily needed with hw palettized texture support */
This->Flags &= ~SFLAG_INTEXTURE;
} else if(palette9_changed(This)) {
TRACE("Reloading surface because the d3d8/9 palette was changed\n");
/* TODO: This is not necessarily needed with hw palettized texture support */
IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL);
/* Make sure the texture is reloaded because of the color key change, this kills performance though :( */
This->Flags &= ~SFLAG_INTEXTURE;
} else {
TRACE("surface is already in texture\n");
return WINED3D_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment