Am Montag 18 Dezember 2006 22:10 schrieb Günther Brammer: > Only tested with wine, unfortunately. Tests for the issue causing Bug 5730. I will run your test on windows, but I'd expect it to work. Can you also test which color key GetSurfaceDesc returns?
> > diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c > index 3d70f82..74e4f28 100644 > --- a/dlls/ddraw/tests/dsurface.c > +++ b/dlls/ddraw/tests/dsurface.c > @@ -167,6 +167,7 @@ static void SrcColorKey32BlitTest(void) > LPDIRECTDRAWSURFACE lpDst; > DDSURFACEDESC ddsd; > DDSURFACEDESC ddsd2; > + DDCOLORKEY DDColorKey; > LPDWORD lpData; > HRESULT rc; > > @@ -222,6 +223,21 @@ static void SrcColorKey32BlitTest(void) > "Destination data after blitting is not correct\n"); > rc = IDirectDrawSurface_Unlock(lpDst, NULL); > ok(rc==DD_OK,"Unlock returned: %x\n",rc); > + > + /* Also test SetColorKey */ > + IDirectDrawSurface_GetColorKey(lpSrc, DDCKEY_SRCBLT, &DDColorKey); > + ok(DDColorKey.dwColorSpaceLowValue == 0xFF00FF && > DDColorKey.dwColorSpaceHighValue == 0xFF00FF, + "GetColorKey does not > return the colorkey used at surface creation\n"); + > + DDColorKey.dwColorSpaceLowValue = 0x00FF00; > + DDColorKey.dwColorSpaceHighValue = 0x00FF00; > + IDirectDrawSurface_SetColorKey(lpSrc, DDCKEY_SRCBLT, &DDColorKey); > + > + DDColorKey.dwColorSpaceLowValue = 0; > + DDColorKey.dwColorSpaceHighValue = 0; > + IDirectDrawSurface_GetColorKey(lpSrc, DDCKEY_SRCBLT, &DDColorKey); > + ok(DDColorKey.dwColorSpaceLowValue == 0x00FF00 && > DDColorKey.dwColorSpaceHighValue == 0x00FF00, + "GetColorKey does not > return the colorkey set with SetColorKey\n"); > > IDirectDrawSurface_Release(lpSrc); > IDirectDrawSurface_Release(lpDst);
pgpR7BuIri1ph.pgp
Description: PGP signature
