Roderick Colenbrander : wined3d: Reload the palette on a color key change. This fixes the ddex4/ddex5 samples from the dx7 sdk.
Alexandre Julliard
julliard at winehq.org
Wed Feb 6 07:27:47 CST 2008
Module: wine
Branch: master
Commit: f84589ea1fd7aae9a2c2c70a6124951aada9e889
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f84589ea1fd7aae9a2c2c70a6124951aada9e889
Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date: Tue Jan 29 22:42:32 2008 +0100
wined3d: Reload the palette on a color key change. This fixes the ddex4/ddex5 samples from the dx7 sdk.
---
dlls/wined3d/surface.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a34c0cf..6cc3b5a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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;
More information about the wine-cvs
mailing list