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
May 2013
----- 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
498 discussions
Start a n
N
ew thread
Austin English : winemenubuilder: Initialize a variable.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: a0b8d304b76c61b7edd539a84db509f081206904 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0b8d304b76c61b7edd539a84…
Author: Austin English <austinenglish(a)gmail.com> Date: Wed May 29 20:30:22 2013 -0700 winemenubuilder: Initialize a variable. --- programs/winemenubuilder/winemenubuilder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 9c81ab8..973bd02 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -3013,7 +3013,7 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link { char *link_name = NULL, *icon_name = NULL; DWORD csidl = -1; - LPWSTR urlPath; + LPWSTR urlPath = NULL; char *escaped_urlPath = NULL; HRESULT hr; HANDLE hSem = NULL;
1
0
0
0
Henri Verbeet : d3drm: Avoid LPDIRECT3DRMANIMATION2.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: 85f83800e394bcb810974f8e08124610e2a999f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85f83800e394bcb810974f8e0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 30 10:05:36 2013 +0200 d3drm: Avoid LPDIRECT3DRMANIMATION2. --- dlls/d3drm/d3drm.c | 7 ++----- include/d3drm.h | 2 +- include/d3drmobj.h | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index 0ffee18..07b4a46 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -929,12 +929,9 @@ static HRESULT WINAPI IDirect3DRM3Impl_CreateFace(IDirect3DRM3 *iface, IDirect3D return Direct3DRMFace_create(&IID_IDirect3DRMFace2, (IUnknown **)face); } -static HRESULT WINAPI IDirect3DRM3Impl_CreateAnimation(IDirect3DRM3* iface, - LPDIRECT3DRMANIMATION2* Animation) +static HRESULT WINAPI IDirect3DRM3Impl_CreateAnimation(IDirect3DRM3 *iface, IDirect3DRMAnimation2 **animation) { - IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface); - - FIXME("(%p/%p)->(%p): stub\n", iface, This, Animation); + FIXME("iface %p, animation %p stub!\n", iface, animation); return E_NOTIMPL; } diff --git a/include/d3drm.h b/include/d3drm.h index b3313fc..b3b120e 100644 --- a/include/d3drm.h +++ b/include/d3drm.h @@ -344,7 +344,7 @@ DECLARE_INTERFACE_(IDirect3DRM3,IUnknown) STDMETHOD(CreateMesh)(THIS_ IDirect3DRMMesh **mesh) PURE; STDMETHOD(CreateMeshBuilder)(THIS_ IDirect3DRMMeshBuilder3 **mesh_builder) PURE; STDMETHOD(CreateFace)(THIS_ IDirect3DRMFace2 **face) PURE; - STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION2 *) PURE; + STDMETHOD(CreateAnimation)(THIS_ IDirect3DRMAnimation2 **animation) PURE; STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET2 *) PURE; STDMETHOD(CreateTexture)(THIS_ D3DRMIMAGE *image, IDirect3DRMTexture3 **texture) PURE; STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light) PURE; diff --git a/include/d3drmobj.h b/include/d3drmobj.h index 41d641c..00bdb21 100644 --- a/include/d3drmobj.h +++ b/include/d3drmobj.h @@ -4031,10 +4031,10 @@ DECLARE_INTERFACE_(IDirect3DRMAnimationSet2, IDirect3DRMObject) STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; /*** IDirect3DRMAnimationSet2 methods ***/ - STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION2 aid) PURE; + STDMETHOD(AddAnimation)(THIS_ IDirect3DRMAnimation2 *animation) PURE; STDMETHOD(Load)(THIS_ void *source, void *object_id, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURE3CALLBACK cb, void *ctx, IDirect3DRMFrame3 *parent_frame)PURE; - STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION2 aid) PURE; + STDMETHOD(DeleteAnimation)(THIS_ IDirect3DRMAnimation2 *animation) PURE; STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE; STDMETHOD(GetAnimations)(THIS_ LPDIRECT3DRMANIMATIONARRAY *) PURE; }; @@ -4369,7 +4369,7 @@ DECLARE_INTERFACE_(IDirect3DRMAnimationArray, IDirect3DRMArray) /*** IDirect3DRMArray methods ***/ STDMETHOD_(DWORD, GetSize)(THIS) PURE; /*** IDirect3DRMAnimationArray methods ***/ - STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMANIMATION2 *) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, IDirect3DRMAnimation2 **element) PURE; }; #undef INTERFACE
1
0
0
0
Henri Verbeet : d3drm: Avoid LPDIRECT3DRMANIMATION.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: eff68af5a0c40417c7c4bfbfca337a778a93dbcb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eff68af5a0c40417c7c4bfbfc…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 30 10:05:35 2013 +0200 d3drm: Avoid LPDIRECT3DRMANIMATION. --- dlls/d3drm/d3drm.c | 13 ++++--------- include/d3drm.h | 4 ++-- include/d3drmobj.h | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index cd65847..0ffee18 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -168,11 +168,9 @@ static HRESULT WINAPI IDirect3DRMImpl_CreateFace(IDirect3DRM* iface, IDirect3DRM return Direct3DRMFace_create(&IID_IDirect3DRMFace, (IUnknown **)face); } -static HRESULT WINAPI IDirect3DRMImpl_CreateAnimation(IDirect3DRM* iface, LPDIRECT3DRMANIMATION * ppAnimation) +static HRESULT WINAPI IDirect3DRMImpl_CreateAnimation(IDirect3DRM *iface, IDirect3DRMAnimation **animation) { - IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface); - - FIXME("(%p/%p)->(%p): stub\n", iface, This, ppAnimation); + FIXME("iface %p, animation %p stub!\n", iface, animation); return E_NOTIMPL; } @@ -544,12 +542,9 @@ static HRESULT WINAPI IDirect3DRM2Impl_CreateFace(IDirect3DRM2 *iface, IDirect3D return Direct3DRMFace_create(&IID_IDirect3DRMFace, (IUnknown **)face); } -static HRESULT WINAPI IDirect3DRM2Impl_CreateAnimation(IDirect3DRM2* iface, - LPDIRECT3DRMANIMATION * ppAnimation) +static HRESULT WINAPI IDirect3DRM2Impl_CreateAnimation(IDirect3DRM2 *iface, IDirect3DRMAnimation **animation) { - IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface); - - FIXME("(%p/%p)->(%p): stub\n", iface, This, ppAnimation); + FIXME("iface %p, animation %p stub!\n", iface, animation); return E_NOTIMPL; } diff --git a/include/d3drm.h b/include/d3drm.h index 24c2dbc..b3313fc 100644 --- a/include/d3drm.h +++ b/include/d3drm.h @@ -62,7 +62,7 @@ DECLARE_INTERFACE_(IDirect3DRM,IUnknown) STDMETHOD(CreateMesh)(THIS_ IDirect3DRMMesh **mesh) PURE; STDMETHOD(CreateMeshBuilder)(THIS_ IDirect3DRMMeshBuilder **mesh_builder) PURE; STDMETHOD(CreateFace)(THIS_ IDirect3DRMFace **face) PURE; - STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION *) PURE; + STDMETHOD(CreateAnimation)(THIS_ IDirect3DRMAnimation **animation) PURE; STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE; STDMETHOD(CreateTexture)(THIS_ D3DRMIMAGE *image, IDirect3DRMTexture **texture) PURE; STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light) PURE; @@ -201,7 +201,7 @@ DECLARE_INTERFACE_(IDirect3DRM2,IUnknown) STDMETHOD(CreateMesh)(THIS_ IDirect3DRMMesh **mesh) PURE; STDMETHOD(CreateMeshBuilder)(THIS_ IDirect3DRMMeshBuilder2 **mesh_builder) PURE; STDMETHOD(CreateFace)(THIS_ IDirect3DRMFace **face) PURE; - STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION *) PURE; + STDMETHOD(CreateAnimation)(THIS_ IDirect3DRMAnimation **animation) PURE; STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE; STDMETHOD(CreateTexture)(THIS_ D3DRMIMAGE *image, IDirect3DRMTexture2 **texture) PURE; STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light) PURE; diff --git a/include/d3drmobj.h b/include/d3drmobj.h index 52f2b29..41d641c 100644 --- a/include/d3drmobj.h +++ b/include/d3drmobj.h @@ -3963,10 +3963,10 @@ DECLARE_INTERFACE_(IDirect3DRMAnimationSet, IDirect3DRMObject) STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; /*** IDirect3DRMAnimationSet methods ***/ - STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE; + STDMETHOD(AddAnimation)(THIS_ IDirect3DRMAnimation *animation) PURE; STDMETHOD(Load)(THIS_ void *filename, void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURECALLBACK cb, void *ctx, IDirect3DRMFrame *parent)PURE; - STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE; + STDMETHOD(DeleteAnimation)(THIS_ IDirect3DRMAnimation *animation) PURE; STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE; }; #undef INTERFACE
1
0
0
0
Henri Verbeet : wined3d: Rename "fogmode" to "wined3d_ffp_ps_fog_mode".
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: 8352d45da51e78b01ed13c1ea8820b2bf9f76706 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8352d45da51e78b01ed13c1ea…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 30 10:05:34 2013 +0200 wined3d: Rename "fogmode" to "wined3d_ffp_ps_fog_mode". This is mostly for consistency with wined3d_ffp_vs_fog_mode. --- dlls/wined3d/arb_program_shader.c | 22 ++++++++++++---------- dlls/wined3d/glsl_shader.c | 10 +++++----- dlls/wined3d/shader.c | 18 +++++++++--------- dlls/wined3d/utils.c | 16 ++++++++-------- dlls/wined3d/wined3d_private.h | 20 +++++++++++--------- 5 files changed, 45 insertions(+), 41 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 405a123..c2c9be2 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -3662,16 +3662,17 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, if (reg_maps->shader_version.major < 3) { - switch(args->super.fog) { - case FOG_OFF: + switch (args->super.fog) + { + case WINED3D_FFP_PS_FOG_OFF: break; - case FOG_LINEAR: + case WINED3D_FFP_PS_FOG_LINEAR: shader_addline(buffer, "OPTION ARB_fog_linear;\n"); break; - case FOG_EXP: + case WINED3D_FFP_PS_FOG_EXP: shader_addline(buffer, "OPTION ARB_fog_exp;\n"); break; - case FOG_EXP2: + case WINED3D_FFP_PS_FOG_EXP2: shader_addline(buffer, "OPTION ARB_fog_exp2;\n"); break; } @@ -6208,11 +6209,12 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con shader_addline(&buffer, "!!ARBfp1.0\n"); - switch(settings->fog) { - case FOG_OFF: break; - case FOG_LINEAR: shader_addline(&buffer, "OPTION ARB_fog_linear;\n"); break; - case FOG_EXP: shader_addline(&buffer, "OPTION ARB_fog_exp;\n"); break; - case FOG_EXP2: shader_addline(&buffer, "OPTION ARB_fog_exp2;\n"); break; + switch (settings->fog) + { + case WINED3D_FFP_PS_FOG_OFF: break; + case WINED3D_FFP_PS_FOG_LINEAR: shader_addline(&buffer, "OPTION ARB_fog_linear;\n"); break; + case WINED3D_FFP_PS_FOG_EXP: shader_addline(&buffer, "OPTION ARB_fog_exp;\n"); break; + case WINED3D_FFP_PS_FOG_EXP2: shader_addline(&buffer, "OPTION ARB_fog_exp2;\n"); break; default: FIXME("Unexpected fog setting %d\n", settings->fog); } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index e85b57e..8316e83 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -4420,24 +4420,24 @@ static void shader_glsl_generate_srgb_write_correction(struct wined3d_shader_buf shader_addline(buffer, "gl_FragData[0] = clamp(gl_FragData[0], 0.0, 1.0);\n"); } -static void shader_glsl_generate_fog_code(struct wined3d_shader_buffer *buffer, enum fogmode mode) +static void shader_glsl_generate_fog_code(struct wined3d_shader_buffer *buffer, enum wined3d_ffp_ps_fog_mode mode) { switch (mode) { - case FOG_OFF: + case WINED3D_FFP_PS_FOG_OFF: return; - case FOG_LINEAR: + case WINED3D_FFP_PS_FOG_LINEAR: /* Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start) */ shader_addline(buffer, "float Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start);\n"); break; - case FOG_EXP: + case WINED3D_FFP_PS_FOG_EXP: /* Fog = e^-(gl_Fog.density * gl_FogFragCoord) */ shader_addline(buffer, "float Fog = exp(-gl_Fog.density * gl_FogFragCoord);\n"); break; - case FOG_EXP2: + case WINED3D_FFP_PS_FOG_EXP2: /* Fog = e^-((gl_Fog.density * gl_FogFragCoord)^2) */ shader_addline(buffer, "float Fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);\n"); break; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 26fd65b..987c72e 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2154,7 +2154,7 @@ void find_ps_compile_args(const struct wined3d_state *state, args->vp_mode = vertexshader; else args->vp_mode = fixedfunction; - args->fog = FOG_OFF; + args->fog = WINED3D_FFP_PS_FOG_OFF; } else { @@ -2166,27 +2166,27 @@ void find_ps_compile_args(const struct wined3d_state *state, case WINED3D_FOG_NONE: if (device->stream_info.position_transformed || use_vs(state)) { - args->fog = FOG_LINEAR; + args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; } switch (state->render_states[WINED3D_RS_FOGVERTEXMODE]) { case WINED3D_FOG_NONE: /* Fall through. */ - case WINED3D_FOG_LINEAR: args->fog = FOG_LINEAR; break; - case WINED3D_FOG_EXP: args->fog = FOG_EXP; break; - case WINED3D_FOG_EXP2: args->fog = FOG_EXP2; break; + case WINED3D_FOG_LINEAR: args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; + case WINED3D_FOG_EXP: args->fog = WINED3D_FFP_PS_FOG_EXP; break; + case WINED3D_FOG_EXP2: args->fog = WINED3D_FFP_PS_FOG_EXP2; break; } break; - case WINED3D_FOG_LINEAR: args->fog = FOG_LINEAR; break; - case WINED3D_FOG_EXP: args->fog = FOG_EXP; break; - case WINED3D_FOG_EXP2: args->fog = FOG_EXP2; break; + case WINED3D_FOG_LINEAR: args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; + case WINED3D_FOG_EXP: args->fog = WINED3D_FFP_PS_FOG_EXP; break; + case WINED3D_FOG_EXP2: args->fog = WINED3D_FFP_PS_FOG_EXP2; break; } } else { - args->fog = FOG_OFF; + args->fog = WINED3D_FFP_PS_FOG_OFF; } } } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 0442957..8f27e61 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3307,13 +3307,13 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d if (!state->render_states[WINED3D_RS_FOGENABLE]) { - settings->fog = FOG_OFF; + settings->fog = WINED3D_FFP_PS_FOG_OFF; } else if (state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3D_FOG_NONE) { if (use_vs(state) || state->vertex_declaration->position_transformed) { - settings->fog = FOG_LINEAR; + settings->fog = WINED3D_FFP_PS_FOG_LINEAR; } else { @@ -3321,13 +3321,13 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d { case WINED3D_FOG_NONE: case WINED3D_FOG_LINEAR: - settings->fog = FOG_LINEAR; + settings->fog = WINED3D_FFP_PS_FOG_LINEAR; break; case WINED3D_FOG_EXP: - settings->fog = FOG_EXP; + settings->fog = WINED3D_FFP_PS_FOG_EXP; break; case WINED3D_FOG_EXP2: - settings->fog = FOG_EXP2; + settings->fog = WINED3D_FFP_PS_FOG_EXP2; break; } } @@ -3337,13 +3337,13 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d switch (state->render_states[WINED3D_RS_FOGTABLEMODE]) { case WINED3D_FOG_LINEAR: - settings->fog = FOG_LINEAR; + settings->fog = WINED3D_FFP_PS_FOG_LINEAR; break; case WINED3D_FOG_EXP: - settings->fog = FOG_EXP; + settings->fog = WINED3D_FFP_PS_FOG_EXP; break; case WINED3D_FOG_EXP2: - settings->fog = FOG_EXP2; + settings->fog = WINED3D_FFP_PS_FOG_EXP2; break; } } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index cbaa12d..84adc27 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -734,11 +734,12 @@ enum vertexprocessing_mode { #define WINED3D_CONST_NUM_UNUSED ~0U -enum fogmode { - FOG_OFF, - FOG_LINEAR, - FOG_EXP, - FOG_EXP2 +enum wined3d_ffp_ps_fog_mode +{ + WINED3D_FFP_PS_FOG_OFF, + WINED3D_FFP_PS_FOG_LINEAR, + WINED3D_FFP_PS_FOG_EXP, + WINED3D_FFP_PS_FOG_EXP2, }; /* Stateblock dependent parameters which have to be hardcoded @@ -764,7 +765,7 @@ enum wined3d_shader_tex_types struct ps_compile_args { struct color_fixup_desc color_fixup[MAX_FRAGMENT_SAMPLERS]; enum vertexprocessing_mode vp_mode; - enum fogmode fog; + enum wined3d_ffp_ps_fog_mode fog; WORD tex_transform; /* ps 1.0-1.3, 4 textures */ WORD tex_types; /* ps 1.0 - 1.4, 6 textures */ WORD srgb_correction; @@ -1672,9 +1673,10 @@ struct texture_stage_op unsigned padding : 10; }; -struct ffp_frag_settings { - struct texture_stage_op op[MAX_TEXTURES]; - enum fogmode fog; +struct ffp_frag_settings +{ + struct texture_stage_op op[MAX_TEXTURES]; + enum wined3d_ffp_ps_fog_mode fog; /* Use shorts instead of chars to get dword alignment */ unsigned short sRGB_write; unsigned short emul_clipplanes;
1
0
0
0
Henri Verbeet : ddraw: Handle the "DirectDrawRenderer" registry key in wined3d.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: e4816996c3efbfd778f2747f65167a0efdb18b46 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4816996c3efbfd778f2747f6…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 30 10:05:33 2013 +0200 ddraw: Handle the "DirectDrawRenderer" registry key in wined3d. --- dlls/ddraw/ddraw.c | 35 ++++++++++++----------- dlls/ddraw/ddraw_private.h | 8 +---- dlls/ddraw/device.c | 2 +- dlls/ddraw/main.c | 61 ++------------------------------------- dlls/wined3d/wined3d_main.c | 10 ++++++ dlls/wined3d/wined3d_private.h | 1 + 6 files changed, 35 insertions(+), 82 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e4816996c3efbfd778f27…
1
0
0
0
Henri Verbeet : ddraw: Replace the various BOOLs in struct ddraw with a flags field.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: b886d06737f5b8d6b83b1029bdd8befad60a1509 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b886d06737f5b8d6b83b1029b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 30 10:05:32 2013 +0200 ddraw: Replace the various BOOLs in struct ddraw with a flags field. --- dlls/ddraw/ddraw.c | 18 +++++++++--------- dlls/ddraw/ddraw_private.h | 8 +++++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index b2b637e..7eda266 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -392,7 +392,7 @@ void ddraw_destroy_swapchain(struct ddraw *ddraw) } } - ddraw->d3d_initialized = FALSE; + ddraw->flags &= ~DDRAW_D3D_INITIALIZED; } else { @@ -586,11 +586,11 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw, /* Set this NOW, otherwise creating the depth stencil surface will cause a * recursive loop until ram or emulated video memory is full. */ - ddraw->d3d_initialized = TRUE; + ddraw->flags |= DDRAW_D3D_INITIALIZED; hr = wined3d_device_init_3d(ddraw->wined3d_device, swapchain_desc); if (FAILED(hr)) { - ddraw->d3d_initialized = FALSE; + ddraw->flags &= ~DDRAW_D3D_INITIALIZED; return hr; } @@ -1025,7 +1025,7 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW /* TODO: Lose the primary surface. */ if (SUCCEEDED(hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode))) { - ddraw->restore_mode = TRUE; + ddraw->flags |= DDRAW_RESTORE_MODE; restore_mode = TRUE; } @@ -1088,7 +1088,7 @@ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface) wined3d_mutex_lock(); - if (!ddraw->restore_mode) + if (!(ddraw->flags & DDRAW_RESTORE_MODE)) { wined3d_mutex_unlock(); return DD_OK; @@ -1102,7 +1102,7 @@ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface) if (SUCCEEDED(hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &original_mode))) { - ddraw->restore_mode = FALSE; + ddraw->flags &= ~DDRAW_RESTORE_MODE; restore_mode = FALSE; } @@ -1687,7 +1687,7 @@ static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *guid) TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - if (ddraw->initialized) + if (ddraw->flags & DDRAW_INITIALIZED) return DDERR_ALREADYINITIALIZED; /* FIXME: To properly take the GUID into account we should call @@ -1695,7 +1695,7 @@ static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *guid) if (guid) FIXME("Ignoring guid %s.\n", debugstr_guid(guid)); - ddraw->initialized = TRUE; + ddraw->flags |= DDRAW_INITIALIZED; return DD_OK; } @@ -4473,7 +4473,7 @@ static HRESULT WINAPI d3d7_EvictManagedTextures(IDirect3D7 *iface) TRACE("iface %p!\n", iface); wined3d_mutex_lock(); - if (ddraw->d3d_initialized) + if (ddraw->flags & DDRAW_D3D_INITIALIZED) wined3d_device_evict_managed_resources(ddraw->wined3d_device); wined3d_mutex_unlock(); diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 25985bd..6b4fedc 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -56,6 +56,10 @@ struct FvfToDecl struct wined3d_vertex_declaration *decl; }; +#define DDRAW_INITIALIZED 0x00000001 +#define DDRAW_D3D_INITIALIZED 0x00000002 +#define DDRAW_RESTORE_MODE 0x00000004 + struct ddraw { /* Interfaces */ @@ -71,12 +75,10 @@ struct ddraw /* See comment in IDirectDraw::AddRef */ LONG ref7, ref4, ref2, ref3, ref1, numIfaces; - BOOL initialized; struct wined3d *wined3d; struct wined3d_device *wined3d_device; - BOOL d3d_initialized; - BOOL restore_mode; + DWORD flags; struct ddraw_surface *primary; RECT primary_lock;
1
0
0
0
Andrew Eikum : oleaut32: Implement ICreateTypeInfo::LayOut.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: d8b98efb4f458b004c41532bf652ae8583056a64 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8b98efb4f458b004c41532bf…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed May 29 15:00:33 2013 -0500 oleaut32: Implement ICreateTypeInfo::LayOut. --- dlls/oleaut32/typelib.c | 142 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 134 insertions(+), 8 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 7fa395a..2711aac 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1119,6 +1119,7 @@ typedef struct tagITypeInfoImpl ICreateTypeInfo2 ICreateTypeInfo2_iface; LONG ref; BOOL not_attached_to_typelib; + BOOL needs_layout; TYPEATTR TypeAttr ; /* _lots_ of type information. */ ITypeLibImpl * pTypeLib; /* back pointer to typelib */ int index; /* index in this typelib; */ @@ -5608,6 +5609,9 @@ static HRESULT WINAPI ITypeInfo_fnGetFuncDesc( ITypeInfo2 *iface, UINT index, if (!ppFuncDesc) return E_INVALIDARG; + if (This->needs_layout) + ICreateTypeInfo2_LayOut(&This->ICreateTypeInfo2_iface); + if (This->TypeAttr.typekind == TKIND_DISPATCH) hr = ITypeInfoImpl_GetInternalDispatchFuncDesc((ITypeInfo *)iface, index, &internal_funcdesc, NULL, @@ -5702,6 +5706,9 @@ static HRESULT WINAPI ITypeInfo_fnGetVarDesc( ITypeInfo2 *iface, UINT index, if(index >= This->TypeAttr.cVars) return TYPE_E_ELEMENTNOTFOUND; + if (This->needs_layout) + ICreateTypeInfo2_LayOut(&This->ICreateTypeInfo2_iface); + return TLB_AllocAndInitVarDesc(&pVDesc->vardesc, ppVarDesc); } @@ -7175,12 +7182,6 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( ITypeInfo_AddRef(*ppTInfo); result = S_OK; - } - else if (This->hreftype == hRefType) - { - *ppTInfo = (ITypeInfo *)&This->ITypeInfo2_iface; - ITypeInfo_AddRef(*ppTInfo); - result = S_OK; } else if ((hRefType & DISPATCH_HREF_MASK) && (This->TypeAttr.typekind == TKIND_DISPATCH)) { @@ -8457,6 +8458,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, UINT typeFlags) { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); + WORD old_flags; + HRESULT hres; TRACE("%p %x\n", This, typeFlags); @@ -8482,8 +8485,15 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeFlags(ICreateTypeInfo2 *iface, return hres; } + old_flags = This->TypeAttr.wTypeFlags; This->TypeAttr.wTypeFlags = typeFlags; + hres = ICreateTypeInfo2_LayOut(iface); + if (FAILED(hres)) { + This->TypeAttr.wTypeFlags = old_flags; + return hres; + } + return S_OK; } @@ -8753,6 +8763,8 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(ICreateTypeInfo2 *iface, ++This->TypeAttr.cFuncs; + This->needs_layout = TRUE; + return S_OK; } @@ -8761,6 +8773,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddImplType(ICreateTypeInfo2 *iface, { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); TLBImplType *impl_type; + HRESULT hres; TRACE("%p %u %d\n", This, index, refType); @@ -8823,6 +8836,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddImplType(ICreateTypeInfo2 *iface, if((refType & (~0x3)) == (This->pTypeLib->dispatch_href & (~0x3))) This->TypeAttr.wTypeFlags |= TYPEFLAG_FDISPATCHABLE; + hres = ICreateTypeInfo2_LayOut(iface); + if (FAILED(hres)) + return hres; + return S_OK; } @@ -9017,8 +9034,117 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeIdldesc(ICreateTypeInfo2 *iface, static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(ICreateTypeInfo2 *iface) { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); - FIXME("%p - stub\n", This); - return E_NOTIMPL; + ITypeInfo *tinfo; + TLBFuncDesc *func_desc; + UINT user_vft = 0, i, depth = 0; + HRESULT hres = S_OK; + + TRACE("%p\n", This); + + This->needs_layout = FALSE; + + hres = ICreateTypeInfo2_QueryInterface(iface, &IID_ITypeInfo, (LPVOID*)&tinfo); + if (FAILED(hres)) + return hres; + + if (This->TypeAttr.typekind == TKIND_INTERFACE) { + ITypeInfo *inh; + TYPEATTR *attr; + HREFTYPE inh_href; + + hres = ITypeInfo_GetRefTypeOfImplType(tinfo, 0, &inh_href); + + if (SUCCEEDED(hres)) { + hres = ITypeInfo_GetRefTypeInfo(tinfo, inh_href, &inh); + + if (SUCCEEDED(hres)) { + hres = ITypeInfo_GetTypeAttr(inh, &attr); + if (FAILED(hres)) { + ITypeInfo_Release(inh); + ITypeInfo_Release(tinfo); + return hres; + } + This->TypeAttr.cbSizeVft = attr->cbSizeVft * 4 / sizeof(void*); + ITypeInfo_ReleaseTypeAttr(inh, attr); + + do{ + ++depth; + hres = ITypeInfo_GetRefTypeOfImplType(inh, 0, &inh_href); + if(SUCCEEDED(hres)){ + ITypeInfo *next; + hres = ITypeInfo_GetRefTypeInfo(inh, inh_href, &next); + if(SUCCEEDED(hres)){ + ITypeInfo_Release(inh); + inh = next; + } + } + }while(SUCCEEDED(hres)); + hres = S_OK; + + ITypeInfo_Release(inh); + } else if (hres == TYPE_E_ELEMENTNOTFOUND) { + This->TypeAttr.cbSizeVft = 0; + hres = S_OK; + } else { + ITypeInfo_Release(tinfo); + return hres; + } + } else if (hres == TYPE_E_ELEMENTNOTFOUND) { + This->TypeAttr.cbSizeVft = 0; + hres = S_OK; + } else { + ITypeInfo_Release(tinfo); + return hres; + } + } else if (This->TypeAttr.typekind == TKIND_DISPATCH) + This->TypeAttr.cbSizeVft = 7 * sizeof(void*); + else + This->TypeAttr.cbSizeVft = 0; + + func_desc = This->funcdescs; + i = 0; + while (i < This->TypeAttr.cFuncs) { + if (!(func_desc->funcdesc.oVft & 0x1)) + func_desc->funcdesc.oVft = This->TypeAttr.cbSizeVft; + + if ((func_desc->funcdesc.oVft & 0xFFFC) > user_vft) + user_vft = func_desc->funcdesc.oVft & 0xFFFC; + + This->TypeAttr.cbSizeVft += sizeof(void*); + + if (func_desc->funcdesc.memid == MEMBERID_NIL) { + TLBFuncDesc *iter; + UINT j = 0; + BOOL reset = FALSE; + + func_desc->funcdesc.memid = 0x60000000 + (depth << 16) + i; + + iter = This->funcdescs; + while (j < This->TypeAttr.cFuncs) { + if (iter != func_desc && iter->funcdesc.memid == func_desc->funcdesc.memid) { + if (!reset) { + func_desc->funcdesc.memid = 0x60000000 + (depth << 16) + This->TypeAttr.cFuncs; + reset = TRUE; + } else + ++func_desc->funcdesc.memid; + iter = This->funcdescs; + j = 0; + } else { + ++iter; + ++j; + } + } + } + + ++func_desc; + ++i; + } + + if (user_vft > This->TypeAttr.cbSizeVft) + This->TypeAttr.cbSizeVft = user_vft + sizeof(void*); + + ITypeInfo_Release(tinfo); + return hres; } static HRESULT WINAPI ICreateTypeInfo2_fnDeleteFuncDesc(ICreateTypeInfo2 *iface,
1
0
0
0
Andrew Eikum : oleaut32: Implement ICreateTypeInfo::SetCustData.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: 02a2a6d936a8eefe9c3699616f21cc0daf401f1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02a2a6d936a8eefe9c3699616…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed May 29 15:00:01 2013 -0500 oleaut32: Implement ICreateTypeInfo::SetCustData. --- dlls/oleaut32/typelib.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 41 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index f903882..7fa395a 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1739,6 +1739,40 @@ static TLBImplType *TLBImplType_Alloc(UINT n) return ret; } +static HRESULT TLB_set_custdata(struct list *custdata_list, REFGUID guid, VARIANT *var) +{ + TLBCustData *cust_data; + + switch(V_VT(var)){ + case VT_I4: + case VT_R4: + case VT_UI4: + case VT_INT: + case VT_UINT: + case VT_HRESULT: + case VT_BSTR: + break; + default: + return DISP_E_BADVARTYPE; + } + + cust_data = TLB_get_custdata_by_guid(custdata_list, guid); + + if (!cust_data) { + cust_data = heap_alloc(sizeof(TLBCustData)); + if (!cust_data) + return E_OUTOFMEMORY; + + cust_data->guid = *guid; + VariantInit(&cust_data->data); + + list_add_tail(custdata_list, &cust_data->entry); + }else + VariantClear(&cust_data->data); + + return VariantCopy(&cust_data->data, var); +} + /********************************************************************** * * Functions for reading MSFT typelibs (those created by CreateTypeLib2) @@ -9031,8 +9065,13 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetCustData(ICreateTypeInfo2 *iface, REFGUID guid, VARIANT *varVal) { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); - FIXME("%p %s %p - stub\n", This, debugstr_guid(guid), varVal); - return E_NOTIMPL; + + TRACE("%p %s %p\n", This, debugstr_guid(guid), varVal); + + if (!guid || !varVal) + return E_INVALIDARG; + + return TLB_set_custdata(&This->custdata_list, guid, varVal); } static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncCustData(ICreateTypeInfo2 *iface,
1
0
0
0
Andrew Eikum : oleaut32: Implement ICreateTypeInfo::SetImplTypeFlags.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: 92b9304ae40a9eac3362d644f1d6694e6ba66ae3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92b9304ae40a9eac3362d644f…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed May 29 14:59:42 2013 -0500 oleaut32: Implement ICreateTypeInfo::SetImplTypeFlags. --- dlls/oleaut32/typelib.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 50a955e..f903882 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -8796,8 +8796,19 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetImplTypeFlags(ICreateTypeInfo2 *ifac UINT index, INT implTypeFlags) { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); - FIXME("%p %u %x - stub\n", This, index, implTypeFlags); - return E_NOTIMPL; + TLBImplType *impl_type = &This->impltypes[index]; + + TRACE("%p %u %x\n", This, index, implTypeFlags); + + if (This->TypeAttr.typekind != TKIND_COCLASS) + return TYPE_E_BADMODULEKIND; + + if (index >= This->TypeAttr.cImplTypes) + return TYPE_E_ELEMENTNOTFOUND; + + impl_type->implflags = implTypeFlags; + + return S_OK; } static HRESULT WINAPI ICreateTypeInfo2_fnSetAlignment(ICreateTypeInfo2 *iface,
1
0
0
0
Andrew Eikum : oleaut32: Implement ICreateTypeInfo::SetFuncAndParamNames.
by Alexandre Julliard
30 May '13
30 May '13
Module: wine Branch: master Commit: 90e72d2d49f2a2c5a6d62fc30aa57efe8ad559fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90e72d2d49f2a2c5a6d62fc30…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed May 29 14:59:09 2013 -0500 oleaut32: Implement ICreateTypeInfo::SetFuncAndParamNames. --- dlls/oleaut32/tests/typelib.c | 7 +++++++ dlls/oleaut32/typelib.c | 41 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 0bc1854..1919ea8 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -3250,6 +3250,13 @@ static void test_SetFuncAndParamNames(void) hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 2, propW, 1); ok(hr == S_OK, "got 0x%08x\n", hr); + hr = ICreateTypeInfo_AddFuncDesc(cti, 3, &funcdesc); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* getter name again */ + hr = ICreateTypeInfo_SetFuncAndParamNames(cti, 3, propW, 1); + ok(hr == TYPE_E_AMBIGUOUSNAME, "got 0x%08x\n", hr); + ICreateTypeInfo_Release(cti); ICreateTypeLib2_Release(ctl); DeleteFileA(filenameA); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 922e9ab..50a955e 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -8840,8 +8840,45 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames(ICreateTypeInfo2 * UINT index, LPOLESTR *names, UINT numNames) { ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface); - FIXME("%p %u %p %u - stub\n", This, index, names, numNames); - return E_NOTIMPL; + TLBFuncDesc *func_desc = &This->funcdescs[index]; + int i; + + TRACE("%p %u %p %u\n", This, index, names, numNames); + + if (!names) + return E_INVALIDARG; + + if (index >= This->TypeAttr.cFuncs || numNames == 0) + return TYPE_E_ELEMENTNOTFOUND; + + if (func_desc->funcdesc.invkind & (INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF)){ + if(numNames > func_desc->funcdesc.cParams) + return TYPE_E_ELEMENTNOTFOUND; + } else + if(numNames > func_desc->funcdesc.cParams + 1) + return TYPE_E_ELEMENTNOTFOUND; + + for(i = 0; i < This->TypeAttr.cFuncs; ++i) { + TLBFuncDesc *iter = &This->funcdescs[i]; + if (iter->Name && !strcmpW(iter->Name, *names)) { + if (iter->funcdesc.invkind & (INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF | INVOKE_PROPERTYGET) && + func_desc->funcdesc.invkind & (INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF | INVOKE_PROPERTYGET) && + func_desc->funcdesc.invkind != iter->funcdesc.invkind) + continue; + return TYPE_E_AMBIGUOUSNAME; + } + } + + SysFreeString(func_desc->Name); + func_desc->Name = SysAllocString(*names); + + for (i = 1; i < numNames; ++i) { + TLBParDesc *par_desc = func_desc->pParamDesc + i - 1; + SysFreeString(par_desc->Name); + par_desc->Name = SysAllocString(*(names + i)); + } + + return S_OK; } static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName(ICreateTypeInfo2 *iface,
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
50
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
Results per page:
10
25
50
100
200