Alexander Dorofeyev : wined3d: Use source colorkey when passed KEYSRC or KEYSRCOVERRIDE.

Alexandre Julliard julliard at winehq.org
Fri May 9 06:27:17 CDT 2008


Module: wine
Branch: master
Commit: 6d86e7f8618cb5fac9d7bccee388d62458425d79
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6d86e7f8618cb5fac9d7bccee388d62458425d79

Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date:   Fri May  9 01:12:24 2008 +0300

wined3d: Use source colorkey when passed KEYSRC or KEYSRCOVERRIDE.

Fixes failure in p8_primary_test when using opengl ddraw renderer.

---

 dlls/wined3d/surface.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 2c84f0c..3a7fc4b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3242,7 +3242,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
         /* Blit from offscreen surface to render target */
         float glTexCoord[4];
         DWORD oldCKeyFlags = Src->CKeyFlags;
-        WINEDDCOLORKEY oldBltCKey = This->SrcBltCKey;
+        WINEDDCOLORKEY oldBltCKey = Src->SrcBltCKey;
         RECT SourceRectangle;
         BOOL paletteOverride = FALSE;
 
@@ -3290,7 +3290,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
         } else if(Flags & WINEDDBLT_KEYSRCOVERRIDE) {
             /* Use color key from DDBltFx */
             Src->CKeyFlags |= WINEDDSD_CKSRCBLT;
-            This->SrcBltCKey = DDBltFx->ddckSrcColorkey;
+            Src->SrcBltCKey = DDBltFx->ddckSrcColorkey;
         } else {
             /* Do not use color key */
             Src->CKeyFlags &= ~WINEDDSD_CKSRCBLT;
@@ -3353,7 +3353,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
              * Which means that the colorkey is one of the palette entries. In other cases pixels that
              * should be masked away have alpha set to 0. */
             if(primary_render_target_is_p8(myDevice))
-                glAlphaFunc(GL_NOTEQUAL, (float)This->SrcBltCKey.dwColorSpaceLowValue / 256.0);
+                glAlphaFunc(GL_NOTEQUAL, (float)Src->SrcBltCKey.dwColorSpaceLowValue / 256.0);
             else
                 glAlphaFunc(GL_NOTEQUAL, 0.0);
             checkGLcall("glAlphaFunc\n");
@@ -3411,7 +3411,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
         }
         /* Restore the color key parameters */
         Src->CKeyFlags = oldCKeyFlags;
-        This->SrcBltCKey = oldBltCKey;
+        Src->SrcBltCKey = oldBltCKey;
 
         /* Clear the palette as the surface didn't have a palette attached, it would confuse GetPalette and other calls */
         if(paletteOverride)




More information about the wine-cvs mailing list