[PATCH] Redownload the surface data in case of a palette change. This fixes a lot of redrawing problems in Red Alert.

Roderick Colenbrander thunderbird2k at gmx.net
Tue Feb 5 06:25:18 CST 2008


---
 dlls/wined3d/surface_base.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index 8a6f546..d733852 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -297,8 +297,9 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_RealizePalette(IWineD3DSurface *iface) {
     if(This->resource.format == WINED3DFMT_P8 ||
        This->resource.format == WINED3DFMT_A8P8)
     {
-        if(!This->Flags & SFLAG_INSYSMEM) {
-            FIXME("Palette changed with surface that does not have an up to date system memory copy\n");
+        if(!(This->Flags & SFLAG_INSYSMEM)) {
+            TRACE("Palette changed with surface that does not have an up to date system memory copy\n");
+            IWineD3DSurface_LoadLocation(iface, SFLAG_INSYSMEM, NULL);
         }
         TRACE("Dirtifying surface\n");
         IWineD3DSurface_ModifyLocation(iface, SFLAG_INSYSMEM, TRUE);
-- 
1.5.3.4


--========GMX62921202218559827375--



More information about the wine-patches mailing list