winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2011
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
852 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: HTMLWindow_item code clean up.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: adafcda41c5c87e6715dc2f8262dbb404f5860b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adafcda41c5c87e6715dc2f82…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Nov 3 19:24:09 2011 +0100 mshtml: HTMLWindow_item code clean up. --- dlls/mshtml/htmlwindow.c | 55 +++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 30 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index ea02cb1..b0b872c 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -323,8 +323,8 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, { HTMLWindow *This = impl_from_IHTMLWindow2(iface); nsIDOMWindowCollection *nsFrames; - HTMLWindow *window; - HRESULT hres; + HTMLWindow *window = NULL; + HRESULT hres = S_OK; nsresult nsres; TRACE("(%p)->(%p %p)\n", This, pvarIndex, pvarResult); @@ -335,29 +335,28 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, return E_FAIL; } - if(V_VT(pvarIndex) == VT_I4) { + switch(V_VT(pvarIndex)) { + case VT_I4: { int index = V_I4(pvarIndex); TRACE("Getting index %d\n", index); - if(index < 0) { - hres = DISP_E_MEMBERNOTFOUND; - goto cleanup; - } + if(index < 0) + break; hres = get_frame_by_index(nsFrames, index, &window); - if(FAILED(hres)) - goto cleanup; - }else if(V_VT(pvarIndex) == VT_UINT) { + break; + } + case VT_UINT: { unsigned int index = V_UINT(pvarIndex); TRACE("Getting index %u\n", index); hres = get_frame_by_index(nsFrames, index, &window); - if(FAILED(hres)) - goto cleanup; - }else if(V_VT(pvarIndex) == VT_BSTR) { + break; + } + case VT_BSTR: { BSTR str = V_BSTR(pvarIndex); PRUint32 length, i; TRACE("Getting name %s\n", wine_dbgstr_w(str)); - nsres = nsIDOMWindowCollection_GetLength(nsFrames, &length); + nsIDOMWindowCollection_GetLength(nsFrames, &length); window = NULL; for(i = 0; i < length && !window; ++i) { @@ -369,7 +368,7 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, if(NS_FAILED(nsres)) { FIXME("nsIDOMWindowCollection_Item failed: 0x%08x\n", nsres); hres = E_FAIL; - goto cleanup; + break; } cur_window = nswindow_to_window(nsWindow); @@ -379,7 +378,7 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, hres = IHTMLElement_get_id(&cur_window->frame_element->element.IHTMLElement_iface, &id); if(FAILED(hres)) { FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres); - goto cleanup; + break; } if(!strcmpW(id, str)) @@ -387,26 +386,22 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, SysFreeString(id); } - - if(!window) { - hres = DISP_E_MEMBERNOTFOUND; - goto cleanup; - } - }else { + break; + } + default: hres = E_INVALIDARG; - goto cleanup; } + nsIDOMWindowCollection_Release(nsFrames); + if(FAILED(hres)) + return hres; + if(!window) + return DISP_E_MEMBERNOTFOUND; + IHTMLWindow2_AddRef(&window->IHTMLWindow2_iface); V_VT(pvarResult) = VT_DISPATCH; V_DISPATCH(pvarResult) = (IDispatch*)window; - - hres = S_OK; - -cleanup: - nsIDOMWindowCollection_Release(nsFrames); - - return hres; + return S_OK; } static HRESULT WINAPI HTMLWindow2_get_length(IHTMLWindow2 *iface, LONG *p)
1
0
0
0
Piotr Caban : user32: Fix DFC_BUTTONRADIOMASK flag support in DrawFrameControl.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 816802cb11bf5037430e5eb0df67288f29600067 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=816802cb11bf5037430e5eb0d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Nov 3 15:10:41 2011 +0100 user32: Fix DFC_BUTTONRADIOMASK flag support in DrawFrameControl. --- dlls/user32/uitools.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/user32/uitools.c b/dlls/user32/uitools.c index e11c411..1c1c679 100644 --- a/dlls/user32/uitools.c +++ b/dlls/user32/uitools.c @@ -792,6 +792,8 @@ static BOOL UITOOLS95_DFC_ButtonRadio(HDC dc, LPRECT r, UINT uFlags) if((uFlags & 0xff) == DFCS_BUTTONRADIOIMAGE) FillRect(dc, r, GetStockObject(BLACK_BRUSH)); + else if((uFlags & 0xff) == DFCS_BUTTONRADIOMASK) + FillRect(dc, r, GetStockObject(WHITE_BRUSH)); xc = myr.left + SmallDiam - SmallDiam/2; yc = myr.top + SmallDiam - SmallDiam/2;
1
0
0
0
Alexandre Julliard : dpnet/tests: Fix a test that fails on Windows.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 997cb5c6751816f2fc39bed3d5211845a9b12396 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=997cb5c6751816f2fc39bed3d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 3 11:24:30 2011 +0100 dpnet/tests: Fix a test that fails on Windows. --- dlls/dpnet/tests/peer.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dpnet/tests/peer.c b/dlls/dpnet/tests/peer.c index 1756ac9..0deb988 100644 --- a/dlls/dpnet/tests/peer.c +++ b/dlls/dpnet/tests/peer.c @@ -131,8 +131,8 @@ static void test_get_sp_caps(void) ok(hr == DPN_OK, "GetSPCaps failed with %x\n", hr); ok(caps.dwFlags == (DPNSPCAPS_SUPPORTSDPNSRV | DPNSPCAPS_SUPPORTSBROADCAST | DPNSPCAPS_SUPPORTSALLADAPTERS | - DPNSPCAPS_SUPPORTSTHREADPOOL), "provider unexpectedly misses some capability flags\n"); - ok(caps.dwNumThreads == 3, "expected 3, got %d\n", caps.dwNumThreads); + DPNSPCAPS_SUPPORTSTHREADPOOL), "unexpected flags %x\n", caps.dwFlags); + ok(caps.dwNumThreads >= 3, "got %d\n", caps.dwNumThreads); ok(caps.dwDefaultEnumCount == 5, "expected 5, got %d\n", caps.dwDefaultEnumCount); ok(caps.dwDefaultEnumRetryInterval == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumRetryInterval); ok(caps.dwDefaultEnumTimeout == 1500, "expected 1500, got %d\n", caps.dwDefaultEnumTimeout);
1
0
0
0
Octavian Voicu : ddraw/tests: Add more attachment/detachment test cases.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 6e75f68153e09f8afb302bce2417a32411b28500 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e75f68153e09f8afb302bce2…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Thu Nov 3 13:32:11 2011 +0200 ddraw/tests: Add more attachment/detachment test cases. --- dlls/ddraw/tests/dsurface.c | 88 ++++++++++++++++++++++++++++++++++++------ 1 files changed, 75 insertions(+), 13 deletions(-) diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index cc5936f..555ad23 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -1452,37 +1452,79 @@ static void AttachmentTest7(void) ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); if (SUCCEEDED(hr)) { - /* DeleteAttachedSurface */ + hr = IDirectDrawSurface7_QueryInterface(surface1, &IID_IDirectDrawSurface, (void **)&surface1v1); + ok(hr == DD_OK, "IDirectDrawSurface7_QueryInterface returned %08x\n", hr); + hr = IDirectDrawSurface7_QueryInterface(surface2, &IID_IDirectDrawSurface, (void **)&surface2v1); + ok(hr == DD_OK, "IDirectDrawSurface7_QueryInterface returned %08x\n", hr); + + /* DeleteAttachedSurface when attaching via IDirectDrawSurface7 */ hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); if (SUCCEEDED(hr)) { ref = getRefcount((IUnknown *)surface2); ok(ref == 2, "Got refcount %d, expected 2\n", ref); - hr = IDirectDrawSurface7_QueryInterface(surface1, &IID_IDirectDrawSurface, (void **)&surface1v1); - ok(hr == DD_OK, "IDirectDrawSurface7_QueryInterface returned %08x\n", hr); - hr = IDirectDrawSurface7_QueryInterface(surface2, &IID_IDirectDrawSurface, (void **)&surface2v1); - ok(hr == DD_OK, "IDirectDrawSurface7_QueryInterface returned %08x\n", hr); + ref = getRefcount((IUnknown *)surface2v1); + ok(ref == 1, "Got refcount %d, expected 1\n", ref); + + /* Try reattach */ + hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); + ok(hr == DDERR_SURFACEALREADYATTACHED, "AddAttachedSurface returned %08x\n", hr); + + /* Attachment / detachment on another interface */ + hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); + todo_wine ok(hr == DDERR_CANNOTATTACHSURFACE, "AddAttachedSurface returned %08x\n", hr); hr = IDirectDrawSurface_DeleteAttachedSurface(surface1v1, 0, surface2v1); ok(hr == DDERR_SURFACENOTATTACHED, "DeleteAttachedSurface returned %08x\n", hr); - if (surface2v1 != NULL) IDirectDrawSurface_Release(surface2v1); - if (surface1v1 != NULL) IDirectDrawSurface_Release(surface1v1); + + /* Attaching while already attached to other surface */ + hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface3, NULL); + ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + hr = IDirectDrawSurface7_AddAttachedSurface(surface3, surface2); + todo_wine ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + hr = IDirectDrawSurface7_DeleteAttachedSurface(surface3, 0, surface2); + ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); + } + IDirectDrawSurface7_Release(surface3); + } + hr = IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface2); ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); ref = getRefcount((IUnknown *)surface2); ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ref = getRefcount((IUnknown *)surface2v1); + ok(ref == 1, "Got refcount %d, expected 1\n", ref); } + /* DeleteAttachedSurface when attaching via IDirectDrawSurface */ + hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); + ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + hr = IDirectDrawSurface7_DeleteAttachedSurface(surface1, 0, surface2); + ok(hr == DDERR_SURFACENOTATTACHED, "DeleteAttachedSurface returned %08x\n", hr); + hr = IDirectDrawSurface_DeleteAttachedSurface(surface1v1, 0, surface2v1); + ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); + } + ref = IDirectDrawSurface7_Release(surface2); + ok(!ref, "Got refcount %d, expected 0\n", ref); + ref = IDirectDrawSurface7_Release(surface1); + ok(!ref, "Got refcount %d, expected 0\n", ref); + /* Automatic detachment on release */ - hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); + hr = IDirectDrawSurface_AddAttachedSurface(surface1v1, surface2v1); ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); - ref = getRefcount((IUnknown *)surface2); + ref = getRefcount((IUnknown *)surface2v1); ok(ref == 2, "Got refcount %d, expected 2\n", ref); - ref = IDirectDrawSurface7_Release(surface1); + ref = IDirectDrawSurface_Release(surface1v1); ok(!ref, "Got refcount %d, expected 0\n", ref); - ref = getRefcount((IUnknown *)surface2); + ref = getRefcount((IUnknown *)surface2v1); ok(ref == 1, "Got refcount %d, expected 1\n", ref); - ref = IDirectDrawSurface7_Release(surface2); + ref = IDirectDrawSurface_Release(surface2v1); ok(!ref, "Got refcount %d, expected 0\n", ref); } else @@ -1736,10 +1778,30 @@ static void AttachmentTest(void) { ref = getRefcount((IUnknown *)surface2); ok(ref == 2, "Got refcount %d, expected 2\n", ref); + + /* Try reattach */ + hr = IDirectDrawSurface_AddAttachedSurface(surface1, surface2); + ok(hr == DDERR_SURFACEALREADYATTACHED, "AddAttachedSurface returned %08x\n", hr); + + /* Attaching while already attached to other surface */ + hr = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface3, NULL); + ok(hr == DD_OK, "CreateSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + hr = IDirectDrawSurface_AddAttachedSurface(surface3, surface2); + todo_wine ok(hr == DD_OK, "AddAttachedSurface returned %08x\n", hr); + if (SUCCEEDED(hr)) + { + hr = IDirectDrawSurface_DeleteAttachedSurface(surface3, 0, surface2); + ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); + } + IDirectDrawSurface_Release(surface3); + } + hr = IDirectDrawSurface_DeleteAttachedSurface(surface1, 0, surface2); ok(hr == DD_OK, "DeleteAttachedSurface returned %08x\n", hr); ref = getRefcount((IUnknown *)surface2); - ok(ref == 1, "Got refcount %d, expected 1\n", ref); + ok(ref == 1, "Got refcount %d, expected 2\n", ref); } /* Automatic detachment on release */
1
0
0
0
Octavian Voicu : ddraw/tests: Use more common pixel formats and caps for attachment tests.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 9776a3bae2138b3ee4fe890b9a9a70b4c65956b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9776a3bae2138b3ee4fe890b9…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Thu Nov 3 13:32:10 2011 +0200 ddraw/tests: Use more common pixel formats and caps for attachment tests. --- dlls/ddraw/tests/dsurface.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 7b5ffd5..cc5936f 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -1427,15 +1427,18 @@ static void AttachmentTest7(void) ddsd.dwHeight = 64; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); - U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; - U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount = 8; + U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_RGB; /* D3DFMT_R5G6B5 */ + U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount = 16; + U2(U4(ddsd).ddpfPixelFormat).dwRBitMask = 0xF800; + U3(U4(ddsd).ddpfPixelFormat).dwGBitMask = 0x07E0; + U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x001F; memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd2.dwWidth = ddsd.dwWidth; ddsd2.dwHeight = ddsd.dwHeight; - ddsd2.ddsCaps.dwCaps = DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER; + ddsd2.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); U4(ddsd2).ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(U4(ddsd2).ddpfPixelFormat).dwZBufferBitDepth = 16; @@ -1701,15 +1704,18 @@ static void AttachmentTest(void) ddsd.dwHeight = 64; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); - U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB; - U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount = 8; + U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_RGB; /* D3DFMT_R5G6B5 */ + U1(U4(ddsd).ddpfPixelFormat).dwRGBBitCount = 16; + U2(U4(ddsd).ddpfPixelFormat).dwRBitMask = 0xF800; + U3(U4(ddsd).ddpfPixelFormat).dwGBitMask = 0x07E0; + U4(U4(ddsd).ddpfPixelFormat).dwBBitMask = 0x001F; memset(&ddsd2, 0, sizeof(ddsd2)); ddsd2.dwSize = sizeof(ddsd2); ddsd2.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; ddsd2.dwWidth = ddsd.dwWidth; ddsd2.dwHeight = ddsd.dwHeight; - ddsd2.ddsCaps.dwCaps = DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER; + ddsd2.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; U4(ddsd2).ddpfPixelFormat.dwSize = sizeof(U4(ddsd2).ddpfPixelFormat); U4(ddsd2).ddpfPixelFormat.dwFlags = DDPF_ZBUFFER; U1(U4(ddsd2).ddpfPixelFormat).dwZBufferBitDepth = 16;
1
0
0
0
Octavian Voicu : ddraw/tests: Move surface attachment tests from refcount. c to dsurface.c.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 6e7bb6495002421c4fd21b265ebe1f12b04f75d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e7bb6495002421c4fd21b265…
Author: Octavian Voicu <octavian.voicu(a)gmail.com> Date: Thu Nov 3 13:32:09 2011 +0200 ddraw/tests: Move surface attachment tests from refcount.c to dsurface.c. --- dlls/ddraw/tests/dsurface.c | 131 ++++++++++++++++++++++++++++++++++++++++++- dlls/ddraw/tests/refcount.c | 106 +--------------------------------- 2 files changed, 133 insertions(+), 104 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6e7bb6495002421c4fd21…
1
0
0
0
Andrew Talbot : sane.ds: Remove unneeded address-of operators from array name.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 8c41a3bd01428b649a77b1661834bc3d1f56c854 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c41a3bd01428b649a77b1661…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Wed Nov 2 22:29:07 2011 +0000 sane.ds: Remove unneeded address-of operators from array name. --- dlls/sane.ds/ui.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c index d57376e..8ff3b70 100644 --- a/dlls/sane.ds/ui.c +++ b/dlls/sane.ds/ui.c @@ -528,7 +528,7 @@ BOOL DoScannerUI(void) hdc = GetDC(0); - memset(&psp,0,sizeof(psp)); + memset(psp,0,sizeof(psp)); rc = psane_control_option(activeDS.deviceHandle, 0, SANE_ACTION_GET_VALUE, &optcount, NULL); if (rc != SANE_STATUS_GOOD) @@ -585,7 +585,7 @@ BOOL DoScannerUI(void) psh.pszCaption = szCaption; psh.nPages = page_count; psh.u2.nStartPage = 0; - psh.u3.ppsp = (LPCPROPSHEETPAGEW) &psp; + psh.u3.ppsp = (LPCPROPSHEETPAGEW)psp; psh.pfnCallback = PropSheetProc; psrc = PropertySheetW(&psh);
1
0
0
0
Stefan Dösinger : wined3d: Locking partial blocks is not allowed in DEFAULT pool resources.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 9b0adb406dda4a1796e8207f1f3206e0d2784ddb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b0adb406dda4a1796e8207f1…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Oct 13 23:35:38 2011 +0200 wined3d: Locking partial blocks is not allowed in DEFAULT pool resources. --- dlls/wined3d/surface.c | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1492071..f75593d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -6,7 +6,7 @@ * Copyright 2002-2003 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2006-2008 Stefan Dösinger for CodeWeavers + * Copyright 2006-2011 Stefan Dösinger for CodeWeavers * Copyright 2007-2008 Henri Verbeet * Copyright 2006-2008 Roderick Colenbrander * Copyright 2009-2011 Henri Verbeet for CodeWeavers @@ -3782,6 +3782,8 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface) HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, WINED3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags) { + const struct wined3d_format *format = surface->resource.format; + TRACE("surface %p, locked_rect %p, rect %s, flags %#x.\n", surface, locked_rect, wine_dbgstr_rect(rect), flags); @@ -3790,6 +3792,29 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, WARN("Surface is already mapped.\n"); return WINED3DERR_INVALIDCALL; } + if ((format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED + && rect && (rect->left || rect->top + || rect->right != surface->resource.width + || rect->bottom != surface->resource.height)) + { + UINT width_mask = format->block_width - 1; + UINT height_mask = format->block_height - 1; + + if ((rect->left & width_mask) || (rect->right & width_mask) + || (rect->top & height_mask) || (rect->bottom & height_mask)) + { + switch (surface->resource.pool) + { + case WINED3DPOOL_DEFAULT: + WARN("Partial block lock with WINED3DPOOL_DEFAULT\n"); + return WINED3DERR_INVALIDCALL; + + default: + FIXME("Partial block lock with %s\n", debug_d3dpool(surface->resource.pool)); + } + } + } + surface->flags |= SFLAG_LOCKED; if (!(surface->flags & SFLAG_LOCKABLE)) @@ -3809,8 +3834,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, } else { - const struct wined3d_format *format = surface->resource.format; - if ((format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_BROKEN_PITCH)) == WINED3DFMT_FLAG_COMPRESSED) { /* Compressed textures are block based, so calculate the offset of
1
0
0
0
Stefan Dösinger : d3d9/tests: Move the double unlock test into a separate test, test other pools.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: f1d98aed7015da2d7a647c6de3b685a55305f08a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1d98aed7015da2d7a647c6de…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Oct 13 23:13:53 2011 +0200 d3d9/tests: Move the double unlock test into a separate test, test other pools. --- dlls/d3d9/tests/surface.c | 48 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c index 8353b81..361e8a3 100644 --- a/dlls/d3d9/tests/surface.c +++ b/dlls/d3d9/tests/surface.c @@ -1,5 +1,6 @@ /* * Copyright 2006-2007 Henri Verbeet + * Copyright 2011 Stefan D�singer for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -238,8 +239,6 @@ static void test_lockrect_offset(IDirect3DDevice9 *device) hr = IDirect3DSurface9_UnlockRect(surface); ok(SUCCEEDED(hr), "UnlockRect failed (%08x)\n", hr); - hr = IDirect3DSurface9_UnlockRect(surface); - ok(hr == D3DERR_INVALIDCALL, "Double UnlockRect returned %08x, expected D3DERR_INVALIDCALL\n", hr); hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &rect, 0); ok(SUCCEEDED(hr), "LockRect failed (%08x)\n", hr); @@ -590,6 +589,50 @@ static void test_surface_format_null(IDirect3DDevice9 *device) IDirect3DTexture9_Release(texture); } +static void test_surface_double_unlock(IDirect3DDevice9 *device) +{ + static const struct + { + D3DPOOL pool; + const char *name; + } + pools[] = + { + { D3DPOOL_DEFAULT, "D3DPOOL_DEFAULT" }, + { D3DPOOL_SCRATCH, "D3DPOOL_SCRATCH" }, + { D3DPOOL_SYSTEMMEM, "D3DPOOL_SYSTEMMEM" }, + /* There are no standalone MANAGED pool surfaces */ + }; + IDirect3DSurface9 *surface; + unsigned int i; + HRESULT hr; + D3DLOCKED_RECT lr; + + for (i = 0; i < (sizeof(pools) / sizeof(*pools)); i++) + { + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 64, 64, D3DFMT_X8R8G8B8, + pools[i].pool, &surface, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateOffscreenPlainSurface failed, hr = 0x%08x, pool %s\n", + hr, pools[i].name); + hr = IDirect3DSurface9_UnlockRect(surface); + ok(hr == D3DERR_INVALIDCALL, "Unlock without lock returned 0x%08x, expected 0x%08x, pool %s\n", + hr, D3DERR_INVALIDCALL, pools[i].name); + + hr = IDirect3DSurface9_LockRect(surface, &lr, NULL, 0); + ok(SUCCEEDED(hr), "IDirect3DSurface9_LockRect failed, hr = 0x%08x, pool %s\n", + hr, pools[i].name); + hr = IDirect3DSurface9_UnlockRect(surface); + ok(SUCCEEDED(hr), "IDirect3DSurface9_UnlockRect failed, hr = 0x%08x, pool %s\n", + hr, pools[i].name); + + hr = IDirect3DSurface9_UnlockRect(surface); + ok(hr == D3DERR_INVALIDCALL, "Double unlock returned 0x%08x, expected 0x%08x, pool %s\n", + hr, D3DERR_INVALIDCALL, pools[i].name); + + IDirect3DSurface9_Release(surface); + } +} + START_TEST(surface) { HMODULE d3d9_handle; @@ -614,6 +657,7 @@ START_TEST(surface) test_getdc(device_ptr); test_surface_dimensions(device_ptr); test_surface_format_null(device_ptr); + test_surface_double_unlock(device_ptr); refcount = IDirect3DDevice9_Release(device_ptr); ok(!refcount, "Device has %u references left\n", refcount);
1
0
0
0
Dmitry Timoshkov : ntdll: Make the VirtualProtect tests pass under Wine.
by Alexandre Julliard
03 Nov '11
03 Nov '11
Module: wine Branch: master Commit: 33255ee6ecf48725e8e061313da8f387a5714e44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33255ee6ecf48725e8e061313…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Oct 31 13:48:54 2011 +0800 ntdll: Make the VirtualProtect tests pass under Wine. --- dlls/kernel32/tests/virtual.c | 16 ---------------- dlls/ntdll/virtual.c | 1 + 2 files changed, 1 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 49630fd..d0b9f4f 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -1472,16 +1472,8 @@ static void test_VirtualProtect(void) } else { - /* FIXME: remove the condition below once Wine is fixed */ - if ((td[i].prot_set == PAGE_WRITECOPY) || (td[i].prot_set == PAGE_EXECUTE_WRITECOPY)) - todo_wine { ok(!ret, "%d: VirtualProtect should fail\n", i); ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); - } - else { - ok(!ret, "%d: VirtualProtect should fail\n", i); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); - } } old_prot = 0xdeadbeef; @@ -1491,13 +1483,7 @@ static void test_VirtualProtect(void) if (td[i].prot_get) ok(old_prot == td[i].prot_get, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_get); else - { - /* FIXME: remove the condition below once Wine is fixed */ - if ((td[i].prot_set == PAGE_WRITECOPY) || (td[i].prot_set == PAGE_EXECUTE_WRITECOPY)) - todo_wine ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); - else ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); - } } exec_prot = 0; @@ -1521,10 +1507,8 @@ static void test_VirtualProtect(void) { if (prot & (PAGE_WRITECOPY | PAGE_EXECUTE_WRITECOPY)) { - todo_wine { ok(!ret, "VirtualProtect(%02x) should fail\n", prot); ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } } else ok(ret, "VirtualProtect(%02x) error %d\n", prot, GetLastError()); diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index b23e596..8c5e773 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -2088,6 +2088,7 @@ NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T size = ROUND_SIZE( addr, size ); base = ROUND_ADDR( addr, page_mask ); if ((status = get_vprot_flags( new_prot, &new_vprot ))) return status; + if (new_vprot & VPROT_WRITECOPY) return STATUS_INVALID_PAGE_PROTECTION; new_vprot |= VPROT_COMMITTED; server_enter_uninterrupted_section( &csVirtual, &sigset );
1
0
0
0
← Newer
1
...
73
74
75
76
77
78
79
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200