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
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
March 2012
----- 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
3 participants
710 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Store filter in HTMLElement object.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: 348338257b62b2c18e6ade0aace296908a8bf8d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=348338257b62b2c18e6ade0aa…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 16 12:17:50 2012 +0100 mshtml: Store filter in HTMLElement object. --- dlls/mshtml/htmlelem.c | 8 ++++++-- dlls/mshtml/htmlstyle.c | 24 +++++++++++++++++------- dlls/mshtml/htmlstyle.h | 2 +- dlls/mshtml/mshtml_private.h | 3 ++- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 7084105..1eab2cd 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -507,7 +507,7 @@ static HRESULT WINAPI HTMLElement_get_style(IHTMLElement *iface, IHTMLStyle **p) return E_FAIL; } - hres = HTMLStyle_Create(nsstyle, &This->style); + hres = HTMLStyle_Create(This, nsstyle, &This->style); nsIDOMCSSStyleDeclaration_Release(nsstyle); if(FAILED(hres)) return hres; @@ -1648,8 +1648,10 @@ void HTMLElement_destructor(HTMLDOMNode *iface) if(This->nselem) nsIDOMHTMLElement_Release(This->nselem); - if(This->style) + if(This->style) { + This->style->elem = NULL; IHTMLStyle_Release(&This->style->IHTMLStyle_iface); + } if(This->attrs) { HTMLDOMAttribute *attr; @@ -1660,6 +1662,8 @@ void HTMLElement_destructor(HTMLDOMNode *iface) IHTMLAttributeCollection_Release(&This->attrs->IHTMLAttributeCollection_iface); } + heap_free(This->filter); + HTMLDOMNode_destructor(&This->node); } diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 0487992..06a9a53 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -694,7 +694,6 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface) if(!ref) { if(This->nsstyle) nsIDOMCSSStyleDeclaration_Release(This->nsstyle); - heap_free(This->filter); release_dispex(&This->dispex); heap_free(This); } @@ -2597,7 +2596,7 @@ static void set_opacity(HTMLStyle *This, const WCHAR *val) static void update_filter(HTMLStyle *This) { - const WCHAR *ptr = This->filter, *ptr2; + const WCHAR *ptr = This->elem->filter, *ptr2; static const WCHAR alphaW[] = {'a','l','p','h','a'}; @@ -2683,14 +2682,19 @@ static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v) TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + if(!This->elem) { + FIXME("Element already destroyed\n"); + return E_UNEXPECTED; + } + if(v) { new_filter = heap_strdupW(v); if(!new_filter) return E_OUTOFMEMORY; } - heap_free(This->filter); - This->filter = new_filter; + heap_free(This->elem->filter); + This->elem->filter = new_filter; update_filter(This); return S_OK; @@ -2702,8 +2706,13 @@ static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p) TRACE("(%p)->(%p)\n", This, p); - if(This->filter) { - *p = SysAllocString(This->filter); + if(!This->elem) { + FIXME("Element already destroyed\n"); + return E_UNEXPECTED; + } + + if(This->elem->filter) { + *p = SysAllocString(This->elem->filter); if(!*p) return E_OUTOFMEMORY; }else { @@ -3038,7 +3047,7 @@ static dispex_static_data_t HTMLStyle_dispex = { HTMLStyle_iface_tids }; -HRESULT HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle, HTMLStyle **ret) +HRESULT HTMLStyle_Create(HTMLElement *elem, nsIDOMCSSStyleDeclaration *nsstyle, HTMLStyle **ret) { HTMLStyle *style; @@ -3049,6 +3058,7 @@ HRESULT HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle, HTMLStyle **ret) style->IHTMLStyle_iface.lpVtbl = &HTMLStyleVtbl; style->ref = 1; style->nsstyle = nsstyle; + style->elem = elem; HTMLStyle2_Init(style); HTMLStyle3_Init(style); diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index a11161e..ef4f2a2 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -28,7 +28,7 @@ struct HTMLStyle { LONG ref; nsIDOMCSSStyleDeclaration *nsstyle; - WCHAR *filter; + HTMLElement *elem; }; /* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */ diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 75591f2..9e30464 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -556,6 +556,7 @@ typedef struct { nsIDOMHTMLElement *nselem; HTMLStyle *style; HTMLAttributeCollection *attrs; + WCHAR *filter; } HTMLElement; #define HTMLELEMENT_TIDS \ @@ -722,7 +723,7 @@ void set_ready_state(HTMLWindow*,READYSTATE) DECLSPEC_HIDDEN; HRESULT HTMLSelectionObject_Create(HTMLDocumentNode*,nsISelection*,IHTMLSelectionObject**) DECLSPEC_HIDDEN; HRESULT HTMLTxtRange_Create(HTMLDocumentNode*,nsIDOMRange*,IHTMLTxtRange**) DECLSPEC_HIDDEN; -HRESULT HTMLStyle_Create(nsIDOMCSSStyleDeclaration*,HTMLStyle**) DECLSPEC_HIDDEN; +HRESULT HTMLStyle_Create(HTMLElement*,nsIDOMCSSStyleDeclaration*,HTMLStyle**) DECLSPEC_HIDDEN; IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet*) DECLSPEC_HIDDEN; IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetList*) DECLSPEC_HIDDEN;
1
0
0
0
Christian Costa : d3drm: Implement SetTextureCoordinates.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: 7a320e5ca4afdfc760efcbb31f4ad9774231828b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a320e5ca4afdfc760efcbb31…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Mar 16 08:16:26 2012 +0100 d3drm: Implement SetTextureCoordinates. --- dlls/d3drm/meshbuilder.c | 15 +++++++++++---- dlls/d3drm/tests/d3drm.c | 28 ++++++++++++++++------------ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 43ce2d6..b386cbf 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -681,9 +681,10 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetTextureCoordinates(IDirect3 { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); - FIXME("(%p)->(%f,%f): stub\n", This, u, v); + TRACE("(%p)->(%u,%f,%f)\n", This, index, u, v); - return E_NOTIMPL; + return IDirect3DRMMeshBuilder3_SetTextureCoordinates(&This->IDirect3DRMMeshBuilder3_iface, + index, u, v); } static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetVertexColor(IDirect3DRMMeshBuilder2* iface, @@ -1555,9 +1556,15 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetTextureCoordinates(IDirect3 { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface); - FIXME("(%p)->(%f,%f): stub\n", This, u, v); + TRACE("(%p)->(%u,%f,%f)\n", This, index, u, v); - return E_NOTIMPL; + if (index >= This->nb_coords2d) + return D3DRMERR_BADVALUE; + + This->pCoords2d[index].u = u; + This->pCoords2d[index].v = v; + + return D3DRM_OK; } static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetVertexColor(IDirect3DRMMeshBuilder3* iface, diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 341519b..454a935 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -210,15 +210,17 @@ static void test_MeshBuilder(void) valu = 1.23f; valv = 3.21f; - hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(pMeshBuilder, 1, valu, valv); - todo_wine ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr); + hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(pMeshBuilder, 0, valu, valv); + ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr); + hr = IDirect3DRMMeshBuilder_SetTextureCoordinates(pMeshBuilder, 4, valu, valv); + ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr); valu = 0.0f; valv = 0.0f; - hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 1, &valu, &valv); - todo_wine ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); - todo_wine ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu); - todo_wine ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv); + hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 0, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu); + ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv); IDirect3DRMMeshBuilder_Release(pMeshBuilder); @@ -353,15 +355,17 @@ static void test_MeshBuilder3(void) valu = 1.23f; valv = 3.21f; - hr = IDirect3DRMMeshBuilder3_SetTextureCoordinates(pMeshBuilder3, 1, valu, valv); - todo_wine ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr); + hr = IDirect3DRMMeshBuilder3_SetTextureCoordinates(pMeshBuilder3, 0, valu, valv); + ok(hr == D3DRM_OK, "Cannot set texture coordinates (hr = %x)\n", hr); + hr = IDirect3DRMMeshBuilder3_SetTextureCoordinates(pMeshBuilder3, 4, valu, valv); + ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr); valu = 0.0f; valv = 0.0f; - hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 1, &valu, &valv); - todo_wine ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); - todo_wine ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu); - todo_wine ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv); + hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 0, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 1.23f, "Wrong coordinate %f (must be 1.23)\n", valu); + ok(valv == 3.21f, "Wrong coordinate %f (must be 3.21)\n", valv); IDirect3DRMMeshBuilder3_Release(pMeshBuilder3); IDirect3DRM3_Release(pD3DRM3);
1
0
0
0
Christian Costa : d3drm: If there is no texture coordinates in loaded mesh, generate default texture coordinates for each vertex.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: b89c32b2a12f78572da336d982aa53b8c8bb99d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b89c32b2a12f78572da336d98…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Mar 16 08:16:18 2012 +0100 d3drm: If there is no texture coordinates in loaded mesh, generate default texture coordinates for each vertex. --- dlls/d3drm/meshbuilder.c | 14 +++++++++++- dlls/d3drm/tests/d3drm.c | 54 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index e9d0e67..43ce2d6 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -1272,6 +1272,18 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* /* Set size (in number of DWORD) of all faces data */ This->face_data_size = faces_data_size; + /* If there is no texture coordinates, generate default texture coordinates (0.0f, 0.0f) for each vertex */ + if (!This->pCoords2d) + { + This->nb_coords2d = This->nb_vertices; + This->pCoords2d = HeapAlloc(GetProcessHeap(), 0, This->nb_coords2d * sizeof(Coords2d)); + for (i = 0; i < This->nb_coords2d; i++) + { + This->pCoords2d[i].u = 0.0f; + This->pCoords2d[i].v = 0.0f; + } + } + ret = D3DRM_OK; end: @@ -1603,7 +1615,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_GetTextureCoordinates(IDirect3 TRACE("(%p)->(%d,%p,%p)\n", This, index, u, v); if (index >= This->nb_coords2d) - return D3DRMERR_NOTFOUND; + return D3DRMERR_BADVALUE; *u = This->pCoords2d[index].u; *v = This->pCoords2d[index].v; diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 1732db6..341519b 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -180,12 +180,33 @@ static void test_MeshBuilder(void) todo_wine ok(val2 == 4, "Wrong number of normals %d (must be 4)\n", val2); ok(val3 == 22, "Wrong number of face data bytes %d (must be 22)\n", val3); + /* Check that Load method generated default texture coordinates (0.0f, 0.0f) for each vertex */ + valu = 1.23f; + valv = 3.21f; + hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 0, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); valu = 1.23f; valv = 3.21f; hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 1, &valu, &valv); - todo_wine ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); - todo_wine ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); - todo_wine ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + valu = 1.23f; + valv = 3.21f; + hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 2, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + valu = 1.23f; + valv = 3.21f; + hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 3, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + hr = IDirect3DRMMeshBuilder_GetTextureCoordinates(pMeshBuilder, 4, &valu, &valv); + ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr); valu = 1.23f; valv = 3.21f; @@ -302,12 +323,33 @@ static void test_MeshBuilder3(void) ok(hr == D3DRM_OK, "Cannot get vertices information (hr = %x)\n", hr); ok(val1 == 4, "Wrong number of vertices %d (must be 4)\n", val1); + /* Check that Load method generated default texture coordinates (0.0f, 0.0f) for each vertex */ + valu = 1.23f; + valv = 3.21f; + hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 0, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); valu = 1.23f; valv = 3.21f; hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 1, &valu, &valv); - todo_wine ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); - todo_wine ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); - todo_wine ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + valu = 1.23f; + valv = 3.21f; + hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 2, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + valu = 1.23f; + valv = 3.21f; + hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 3, &valu, &valv); + ok(hr == D3DRM_OK, "Cannot get texture coordinates (hr = %x)\n", hr); + ok(valu == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valu); + ok(valv == 0.0f, "Wrong coordinate %f (must be 0.0)\n", valv); + hr = IDirect3DRMMeshBuilder3_GetTextureCoordinates(pMeshBuilder3, 4, &valu, &valv); + ok(hr == D3DRMERR_BADVALUE, "Should fail and return D3DRM_BADVALUE (hr = %x)\n", hr); valu = 1.23f; valv = 3.21f;
1
0
0
0
Christian Costa : d3drm: Add refcount info to AddRef and Release traces.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: ea532f633c6af03c642537cce2925da22c2fdf9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ea532f633c6af03c642537cce…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Mar 16 08:16:10 2012 +0100 d3drm: Add refcount info to AddRef and Release traces. --- dlls/d3drm/d3drm.c | 7 ++++--- dlls/d3drm/device.c | 7 ++++--- dlls/d3drm/frame.c | 7 ++++--- dlls/d3drm/meshbuilder.c | 7 ++++--- dlls/d3drm/viewport.c | 7 ++++--- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index 879d8b0..d140c08 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -87,10 +87,11 @@ static HRESULT WINAPI IDirect3DRMImpl_QueryInterface(IDirect3DRM* iface, REFIID static ULONG WINAPI IDirect3DRMImpl_AddRef(IDirect3DRM* iface) { IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p/%p)\n", iface, This); + TRACE("(%p/%p)->(): new ref = %d\n", iface, This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMImpl_Release(IDirect3DRM* iface) @@ -98,7 +99,7 @@ static ULONG WINAPI IDirect3DRMImpl_Release(IDirect3DRM* iface) IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p/%p)\n", iface, This); + TRACE("(%p/%p)->(): new ref = %d\n", iface, This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c index 559128e..e6d1036 100644 --- a/dlls/d3drm/device.c +++ b/dlls/d3drm/device.c @@ -93,10 +93,11 @@ static HRESULT WINAPI IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2* static ULONG WINAPI IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface) { IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", iface, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface) @@ -104,7 +105,7 @@ static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface) IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", iface, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c index d91def8..5d5427f 100644 --- a/dlls/d3drm/frame.c +++ b/dlls/d3drm/frame.c @@ -78,10 +78,11 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* if static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface) { IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface) @@ -89,7 +90,7 @@ static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface) IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 6f5451b..e9d0e67 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -322,10 +322,11 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_QueryInterface(IDirect3DRMMesh static ULONG WINAPI IDirect3DRMMeshBuilder2Impl_AddRef(IDirect3DRMMeshBuilder2* iface) { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMMeshBuilder2Impl_Release(IDirect3DRMMeshBuilder2* iface) @@ -333,7 +334,7 @@ static ULONG WINAPI IDirect3DRMMeshBuilder2Impl_Release(IDirect3DRMMeshBuilder2* IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); if (!ref) { diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c index 16e812a..5122140 100644 --- a/dlls/d3drm/viewport.c +++ b/dlls/d3drm/viewport.c @@ -80,10 +80,11 @@ static HRESULT WINAPI IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport static ULONG WINAPI IDirect3DRMViewportImpl_AddRef(IDirect3DRMViewport* iface) { IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMViewportImpl_Release(IDirect3DRMViewport* iface) @@ -91,7 +92,7 @@ static ULONG WINAPI IDirect3DRMViewportImpl_Release(IDirect3DRMViewport* iface) IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This);
1
0
0
0
Christian Costa : d3drm: Texture callback cannot be passed directly. Texture object argument is different so disable it for now.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: 549f8796dd0ad40afb2375f6484c46209d333539 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=549f8796dd0ad40afb2375f64…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Mar 16 08:16:02 2012 +0100 d3drm: Texture callback cannot be passed directly. Texture object argument is different so disable it for now. --- dlls/d3drm/meshbuilder.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 1641a5c..6f5451b 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -440,8 +440,11 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_Load(IDirect3DRMMeshBuilder2* TRACE("(%p)->(%p,%p,%x,%p,%p)\n", This, filename, name, loadflags, cb, arg); + if (cb) + FIXME("Texture callback is not yet supported\n"); + return IDirect3DRMMeshBuilder3_Load(&This->IDirect3DRMMeshBuilder3_iface, filename, name, - loadflags, (D3DRMLOADTEXTURE3CALLBACK)cb, arg); + loadflags, NULL, arg); } static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_Save(IDirect3DRMMeshBuilder2* iface,
1
0
0
0
Christian Costa : d3drm: Remove "partial stub" mention of forwarded methods .
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: c6ce077f413d958186d83d7bc733c7952368a542 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6ce077f413d958186d83d7bc…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Mar 16 08:15:53 2012 +0100 d3drm: Remove "partial stub" mention of forwarded methods. --- dlls/d3drm/meshbuilder.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index d8d9ff2..1641a5c 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -438,7 +438,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_Load(IDirect3DRMMeshBuilder2* { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); - TRACE("(%p)->(%p,%p,%x,%p,%p): partial stub\n", This, filename, name, loadflags, cb, arg); + TRACE("(%p)->(%p,%p,%x,%p,%p)\n", This, filename, name, loadflags, cb, arg); return IDirect3DRMMeshBuilder3_Load(&This->IDirect3DRMMeshBuilder3_iface, filename, name, loadflags, (D3DRMLOADTEXTURE3CALLBACK)cb, arg); @@ -745,7 +745,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_GetTextureCoordinates(IDirect3 { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); - TRACE("(%p)->(%d,%p,%p)\n", This, index, u, v); + TRACE("(%p)->(%u,%p,%p)\n", This, index, u, v); return IDirect3DRMMeshBuilder3_GetTextureCoordinates(&This->IDirect3DRMMeshBuilder3_iface, index, u, v);
1
0
0
0
Alexandre Julliard : dbghelp: Add support for jump instructions in function epilogs on x86_64.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: 0a7827b8b2416d60eccd507c1e8c5137eea0bf11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a7827b8b2416d60eccd507c1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 16 13:15:38 2012 +0100 dbghelp: Add support for jump instructions in function epilogs on x86_64. --- dlls/dbghelp/cpu_x86_64.c | 47 ++++++++++++++++++++++++++++++++------------ 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c index 8de28ef..711c78c 100644 --- a/dlls/dbghelp/cpu_x86_64.c +++ b/dlls/dbghelp/cpu_x86_64.c @@ -290,9 +290,11 @@ static int get_opcode_size(UNWIND_CODE op) } } -static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc) +static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc, + DWORD64 base, const RUNTIME_FUNCTION *function ) { - BYTE op0, op1, op2; + BYTE op0, op1, op2; + LONG val32; if (!sw_read_mem(csw, pc, &op0, 1)) return FALSE; @@ -338,12 +340,9 @@ static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc) /* now check for various pop instructions */ for (;;) { - BYTE rex = 0; - if (!sw_read_mem(csw, pc, &op0, 1)) return FALSE; - if ((op0 & 0xf0) == 0x40) + if ((op0 & 0xf0) == 0x40) /* rex prefix */ { - rex = op0 & 0x0f; /* rex prefix */ if (!sw_read_mem(csw, ++pc, &op0, 1)) return FALSE; } @@ -362,7 +361,21 @@ static BOOL is_inside_epilog(struct cpu_stack_walk* csw, DWORD64 pc) case 0xc2: /* ret $nn */ case 0xc3: /* ret */ return TRUE; - /* FIXME: add various jump instructions */ + case 0xe9: /* jmp nnnn */ + if (!sw_read_mem(csw, pc + 1, &val32, sizeof(LONG))) return FALSE; + pc += 5 + val32; + if (pc - base >= function->BeginAddress && pc - base < function->EndAddress) + continue; + break; + case 0xeb: /* jmp n */ + if (!sw_read_mem(csw, pc + 1, &op1, 1)) return FALSE; + pc += 2 + (signed char)op1; + if (pc - base >= function->BeginAddress && pc - base < function->EndAddress) + continue; + break; + case 0xf3: /* rep; ret (for amd64 prediction bug) */ + if (!sw_read_mem(csw, pc + 1, &op1, 1)) return FALSE; + return op1 == 0xc3; } return FALSE; } @@ -402,8 +415,8 @@ static BOOL interpret_epilog(struct cpu_stack_walk* csw, ULONG64 pc, CONTEXT *co pc++; continue; case 0x81: /* add $nnnn,%rsp */ - if (!sw_read_mem(csw, pc + 2, &val32, sizeof(ULONG))) return FALSE; - context->Rsp += (LONG)val32; + if (!sw_read_mem(csw, pc + 2, &val32, sizeof(LONG))) return FALSE; + context->Rsp += val32; pc += 2 + sizeof(LONG); continue; case 0x83: /* add $n,%rsp */ @@ -421,8 +434,8 @@ static BOOL interpret_epilog(struct cpu_stack_walk* csw, ULONG64 pc, CONTEXT *co } else /* lea nnnn(reg),%rsp */ { - if (!sw_read_mem(csw, pc + 2, &val32, sizeof(ULONG))) return FALSE; - context->Rsp = get_int_reg( context, (insn & 7) + (rex & 1) * 8 ) + (LONG)val32; + if (!sw_read_mem(csw, pc + 2, &val32, sizeof(LONG))) return FALSE; + context->Rsp = get_int_reg( context, (insn & 7) + (rex & 1) * 8 ) + val32; pc += 2 + sizeof(LONG); } continue; @@ -433,11 +446,19 @@ static BOOL interpret_epilog(struct cpu_stack_walk* csw, ULONG64 pc, CONTEXT *co context->Rsp += sizeof(ULONG64) + val16; return TRUE; case 0xc3: /* ret */ + case 0xf3: /* rep; ret */ if (!sw_read_mem(csw, context->Rsp, &val64, sizeof(DWORD64))) return FALSE; context->Rip = val64; context->Rsp += sizeof(ULONG64); return TRUE; - /* FIXME: add various jump instructions */ + case 0xe9: /* jmp nnnn */ + if (!sw_read_mem(csw, pc + 1, &val32, sizeof(LONG))) return FALSE; + pc += 5 + val32; + continue; + case 0xeb: /* jmp n */ + if (!sw_read_mem(csw, pc + 1, &val8, sizeof(BYTE))) return FALSE; + pc += 2 + (signed char)val8; + continue; } FIXME("unsupported insn %x\n", insn); return FALSE; @@ -497,7 +518,7 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw, else { prolog_offset = ~0; - if (is_inside_epilog(csw, context->Rip)) + if (is_inside_epilog(csw, context->Rip, base, function)) { interpret_epilog(csw, context->Rip, context); return TRUE;
1
0
0
0
Alexandre Julliard : msxml3: Avoid building code that isn' t used without libxml.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: 58fe32e1eaa2686fe0ad0bdb1a0e080862d4c2a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58fe32e1eaa2686fe0ad0bdb1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 16 13:02:24 2012 +0100 msxml3: Avoid building code that isn't used without libxml. --- dlls/msxml3/xmlview.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/xmlview.c b/dlls/msxml3/xmlview.c index 5434667..f3e7f89 100644 --- a/dlls/msxml3/xmlview.c +++ b/dlls/msxml3/xmlview.c @@ -42,6 +42,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); +#ifdef HAVE_LIBXML2 + typedef struct { IPersistMoniker IPersistMoniker_iface; @@ -1422,7 +1424,6 @@ static IOleObjectVtbl XMLView_OleObjectVtbl = { XMLView_OleObject_SetColorScheme }; -#ifdef HAVE_LIBXML2 HRESULT XMLView_create(IUnknown *outer, void **ppObj) { XMLView *This; @@ -1453,11 +1454,14 @@ HRESULT XMLView_create(IUnknown *outer, void **ppObj) *ppObj = &This->IPersistMoniker_iface; return S_OK; } + #else + HRESULT XMLView_create(IUnknown *outer, void **ppObj) { MESSAGE("This program tried to use a XMLView object, but\n" "libxml2 support was not present at compile time.\n"); return E_NOTIMPL; } -#endif + +#endif /* HAVE_LIBXML2 */
1
0
0
0
Ken Thomases : shell32: Partially implement Mac Trash backing for the Recycle Bin.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: cd454fdc2ed6c4a8b432dd4617fb61949c786087 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd454fdc2ed6c4a8b432dd461…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 14 16:49:47 2012 -0500 shell32: Partially implement Mac Trash backing for the Recycle Bin. --- configure | 4 ++ configure.ac | 2 + dlls/shell32/Makefile.in | 1 + dlls/shell32/trash.c | 86 +++++++++++++++++++++++++++++++++++++++++++--- include/config.h.in | 3 ++ 5 files changed, 91 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 3c4c966..d28b52a 100755 --- a/configure +++ b/configure @@ -666,6 +666,7 @@ COREAUDIO SECURITYLIB DISKARBITRATIONLIB LDEXECFLAGS +CORESERVICESLIB APPLICATIONSERVICESLIB IOKITLIB COREFOUNDATIONLIB @@ -5752,6 +5753,7 @@ for ac_header in \ CL/cl.h \ Carbon/Carbon.h \ CoreAudio/CoreAudio.h \ + CoreServices/CoreServices.h \ DiskArbitration/DiskArbitration.h \ IOKit/IOKitLib.h \ IOKit/hid/IOHIDLib.h \ @@ -6495,6 +6497,8 @@ fi APPLICATIONSERVICESLIB="-framework ApplicationServices" + CORESERVICESLIB="-framework CoreServices" + case $host_os in darwin11*) LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-macosx_version_min,10.6,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000" diff --git a/configure.ac b/configure.ac index 023e46e..a0e785b 100644 --- a/configure.ac +++ b/configure.ac @@ -392,6 +392,7 @@ AC_CHECK_HEADERS(\ CL/cl.h \ Carbon/Carbon.h \ CoreAudio/CoreAudio.h \ + CoreServices/CoreServices.h \ DiskArbitration/DiskArbitration.h \ IOKit/IOKitLib.h \ IOKit/hid/IOHIDLib.h \ @@ -714,6 +715,7 @@ case $host_os in AC_SUBST(COREFOUNDATIONLIB,"-framework CoreFoundation") AC_SUBST(IOKITLIB,"-framework IOKit -framework CoreFoundation") AC_SUBST(APPLICATIONSERVICESLIB,"-framework ApplicationServices") + AC_SUBST(CORESERVICESLIB,"-framework CoreServices") case $host_os in darwin11*) AC_SUBST(LDEXECFLAGS,["-image_base 0x7bf00000 -Wl,-macosx_version_min,10.6,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000"]) ;; diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in index cf61e43..ef2d734 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -3,6 +3,7 @@ MODULE = shell32.dll IMPORTLIB = shell32 IMPORTS = uuid shlwapi comctl32 user32 gdi32 advapi32 DELAYIMPORTS = ole32 oleaut32 shdocvw version +EXTRALIBS = @CORESERVICESLIB@ C_SRCS = \ appbar.c \ diff --git a/dlls/shell32/trash.c b/dlls/shell32/trash.c index c2e4ab2..a5d53a1 100644 --- a/dlls/shell32/trash.c +++ b/dlls/shell32/trash.c @@ -22,7 +22,20 @@ #include "config.h" +#ifdef HAVE_CORESERVICES_CORESERVICES_H +#define GetCurrentThread MacGetCurrentThread +#define LoadResource MacLoadResource +#include <CoreServices/CoreServices.h> +#undef GetCurrentThread +#undef LoadResource +#undef DPRINTF +#endif + #include <stdarg.h> +#include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <time.h> #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif @@ -41,17 +54,78 @@ #include "winreg.h" #include "shlwapi.h" #include "winternl.h" - -#include <stdio.h> -#include <fcntl.h> -#include <errno.h> -#include <time.h> #include "wine/debug.h" #include "shell32_main.h" #include "xdg.h" WINE_DEFAULT_DEBUG_CHANNEL(trash); +#ifdef HAVE_CORESERVICES_CORESERVICES_H + +BOOL TRASH_CanTrashFile(LPCWSTR wszPath) +{ + char *unix_path; + OSStatus status; + FSRef ref; + FSCatalogInfo catalogInfo; + + TRACE("(%s)\n", debugstr_w(wszPath)); + if (!(unix_path = wine_get_unix_file_name(wszPath))) + return FALSE; + + status = FSPathMakeRef((UInt8*)unix_path, &ref, NULL); + HeapFree(GetProcessHeap(), 0, unix_path); + if (status == noErr) + status = FSGetCatalogInfo(&ref, kFSCatInfoVolume, &catalogInfo, NULL, + NULL, NULL); + if (status == noErr) + status = FSFindFolder(catalogInfo.volume, kTrashFolderType, + kCreateFolder, &ref); + + return (status == noErr); +} + +BOOL TRASH_TrashFile(LPCWSTR wszPath) +{ + char *unix_path; + OSStatus status; + + TRACE("(%s)\n", debugstr_w(wszPath)); + if (!(unix_path = wine_get_unix_file_name(wszPath))) + return FALSE; + + status = FSPathMoveObjectToTrashSync(unix_path, NULL, kFSFileOperationSkipPreflight); + + HeapFree(GetProcessHeap(), 0, unix_path); + return (status == noErr); +} + +HRESULT TRASH_EnumItems(LPITEMIDLIST **pidls, int *count) +{ + FIXME("stub!\n"); + return E_NOTIMPL; +} + +HRESULT TRASH_UnpackItemID(LPCSHITEMID id, WIN32_FIND_DATAW *data) +{ + FIXME("stub!\n"); + return E_NOTIMPL; +} + +HRESULT TRASH_RestoreItem(LPCITEMIDLIST pidl) +{ + FIXME("stub!\n"); + return E_NOTIMPL; +} + +HRESULT TRASH_EraseItem(LPCITEMIDLIST pidl) +{ + FIXME("stub!\n"); + return E_NOTIMPL; +} + +#else /* HAVE_CORESERVICES_CORESERVICES_H */ + static CRITICAL_SECTION TRASH_Creating; static CRITICAL_SECTION_DEBUG TRASH_Creating_Debug = { @@ -603,3 +677,5 @@ HRESULT TRASH_EraseItem(LPCITEMIDLIST pidl) SHFree(file_path); return S_OK; } + +#endif /* HAVE_CORESERVICES_CORESERVICES_H */ diff --git a/include/config.h.in b/include/config.h.in index c26def2..0332f69 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -61,6 +61,9 @@ /* Define to 1 if you have the <CoreAudio/CoreAudio.h> header file. */ #undef HAVE_COREAUDIO_COREAUDIO_H +/* Define to 1 if you have the <CoreServices/CoreServices.h> header file. */ +#undef HAVE_CORESERVICES_CORESERVICES_H + /* Define to 1 if you have the <cups/cups.h> header file. */ #undef HAVE_CUPS_CUPS_H
1
0
0
0
Alistair Leslie-Hughes : mscoree: Better support RUNTIME_INFO_UPGRADE_VERSION in GetRequestedRuntimeInfo.
by Alexandre Julliard
16 Mar '12
16 Mar '12
Module: wine Branch: master Commit: f67d34f7afd405811e25ecc8f46468aa64eb9767 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f67d34f7afd405811e25ecc8f…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Mar 12 16:15:31 2012 +1100 mscoree: Better support RUNTIME_INFO_UPGRADE_VERSION in GetRequestedRuntimeInfo. --- dlls/mscoree/metahost.c | 24 +++++++++++++++++++++--- dlls/mscoree/tests/mscoree.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 49fb0ee..e15a638 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -1310,11 +1310,21 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, if (version) { - return CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)result); + hr = CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)result); + if(SUCCEEDED(hr)) + return hr; } if (runtimeinfo_flags & RUNTIME_INFO_UPGRADE_VERSION) { + DWORD major, minor, build; + + if (version && !parse_runtime_version(version, &major, &minor, &build)) + { + ERR("Cannot parse %s\n", debugstr_w(version)); + return CLR_E_SHIM_RUNTIME; + } + find_runtimes(); if (legacy) @@ -1325,8 +1335,16 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, while (i--) { if (runtimes[i].mono_abi_version) - return ICLRRuntimeInfo_QueryInterface(&runtimes[i].ICLRRuntimeInfo_iface, - &IID_ICLRRuntimeInfo, (void **)result); + { + /* Must be greater or equal to the version passed in. */ + if (!version || ((runtimes[i].major >= major && runtimes[i].minor >= minor && runtimes[i].build >= build) || + (runtimes[i].major >= major && runtimes[i].minor > minor) || + (runtimes[i].major > major))) + { + return ICLRRuntimeInfo_QueryInterface(&runtimes[i].ICLRRuntimeInfo_iface, + &IID_ICLRRuntimeInfo, (void **)result); + } + } } if (legacy) diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c index 56351c3..9b115c0 100644 --- a/dlls/mscoree/tests/mscoree.c +++ b/dlls/mscoree/tests/mscoree.c @@ -60,8 +60,11 @@ static BOOL init_functionpointers(void) static void test_versioninfo(void) { + const WCHAR v9_0[] = {'v','9','.','0','.','3','0','3','1','9',0}; const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0}; + const WCHAR v2_0_0[] = {'v','2','.','0','.','0',0}; const WCHAR v1_1[] = {'v','1','.','1','.','4','3','2','2',0}; + const WCHAR v1_1_0[] = {'v','1','.','1','.','0',0}; WCHAR version[MAX_PATH]; WCHAR path[MAX_PATH]; @@ -143,6 +146,40 @@ static void test_versioninfo(void) hr = pGetRequestedRuntimeInfo( NULL, v2_0, NULL, 0, 0, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr); ok(!winetest_strcmpW(version, v2_0), "version is %s , expected %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v2_0)); + + /* Invalid Version and RUNTIME_INFO_UPGRADE_VERSION flag*/ + memset(version, 0, sizeof(version)); + hr = pGetRequestedRuntimeInfo( NULL, v1_1, NULL, 0, RUNTIME_INFO_UPGRADE_VERSION, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); + ok(hr == S_OK || hr == CLR_E_SHIM_RUNTIME , "GetRequestedRuntimeInfo returned %08x\n", hr); + if(hr == S_OK) + { + /* .NET 1.1 may not be installed. */ + ok(!winetest_strcmpW(version, v1_1) || !winetest_strcmpW(version, v2_0), + "version is %s , expected %s or %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v1_1), wine_dbgstr_w(v2_0)); + + } + + memset(version, 0, sizeof(version)); + hr = pGetRequestedRuntimeInfo( NULL, v9_0, NULL, 0, RUNTIME_INFO_UPGRADE_VERSION, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); + ok(hr == CLR_E_SHIM_RUNTIME, "GetRequestedRuntimeInfo returned %08x\n", hr); + + memset(version, 0, sizeof(version)); + hr = pGetRequestedRuntimeInfo( NULL, v1_1_0, NULL, 0, 0, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); + ok(hr == CLR_E_SHIM_RUNTIME, "GetRequestedRuntimeInfo returned %08x\n", hr); + + memset(version, 0, sizeof(version)); + hr = pGetRequestedRuntimeInfo( NULL, v1_1_0, NULL, 0, RUNTIME_INFO_UPGRADE_VERSION, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); + ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr); + ok(!winetest_strcmpW(version, v2_0), "version is %s , expected %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v2_0)); + + memset(version, 0, sizeof(version)); + hr = pGetRequestedRuntimeInfo( NULL, v2_0_0, NULL, 0, 0, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); + ok(hr == CLR_E_SHIM_RUNTIME, "GetRequestedRuntimeInfo returned %08x\n", hr); + + memset(version, 0, sizeof(version)); + hr = pGetRequestedRuntimeInfo( NULL, v2_0_0, NULL, 0, RUNTIME_INFO_UPGRADE_VERSION, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); + ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr); + ok(!winetest_strcmpW(version, v2_0), "version is %s , expected %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v2_0)); } static void test_loadlibraryshim(void)
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
71
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
Results per page:
10
25
50
100
200