Module: wine Branch: master Commit: 714991bf3fb974ec1dcb390a712fabb9f058f01e URL: http://source.winehq.org/git/wine.git/?a=commit;h=714991bf3fb974ec1dcb390a71...
Author: Stefan Dösinger stefan@codeweavers.com Date: Fri Oct 26 18:43:08 2007 +0200
ddraw: Fix a test for Vista.
---
dlls/ddraw/tests/dsurface.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 1b4ec4e..0f522db 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -287,8 +287,18 @@ static void SrcColorKey32BlitTest(void) ok(rc==DD_OK,"Lock returned: %x\n",rc); ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n"); lpData = (LPDWORD)ddsd2.lpSurface; - ok((lpData[0]==0x77010203)&&(lpData[1]==0x00010203)&&(lpData[2]==0xCCCCCCCC)&&(lpData[3]==0xCCCCCCCC), - "Destination data after blitting is not correct\n"); + /* Different behavior on some drivers / windows versions. Some versions ignore the X channel when + * color keying, but copy it to the destination surface. Others apply it for color keying, but + * do not copy it into the destination surface. + */ + if(lpData[0]==0x00010203) { + trace("X channel was not copied into the destination surface\n"); + ok((lpData[0]==0x00010203)&&(lpData[1]==0x00010203)&&(lpData[2]==0x00FF00FF)&&(lpData[3]==0xCCCCCCCC), + "Destination data after blitting is not correct\n"); + } else { + ok((lpData[0]==0x77010203)&&(lpData[1]==0x00010203)&&(lpData[2]==0xCCCCCCCC)&&(lpData[3]==0xCCCCCCCC), + "Destination data after blitting is not correct\n"); + } rc = IDirectDrawSurface_Unlock(lpDst, NULL); ok(rc==DD_OK,"Unlock returned: %x\n",rc);