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
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
September 2008
----- 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
3 participants
1215 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Split off a function for applying an attachment' s filter states.
by Alexandre Julliard
19 Sep '08
19 Sep '08
Module: wine Branch: master Commit: 9533a5cbbf76cf4b9013ed90dd96e0f3995d44f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9533a5cbbf76cf4b9013ed90d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Sep 18 14:57:53 2008 +0200 wined3d: Split off a function for applying an attachment's filter states. --- dlls/wined3d/context.c | 130 ++++++++++++++++++++++-------------------------- 1 files changed, 60 insertions(+), 70 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index b6d8e9b..c3297ac 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -72,55 +72,79 @@ static void context_destroy_fbo(IWineD3DDeviceImpl *This, const GLuint *fbo) checkGLcall("glDeleteFramebuffers()"); } -/* TODO: Handle stencil attachments */ -void context_attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer) +static void context_apply_attachment_filter_states(IWineD3DDevice *iface, IWineD3DSurface *surface, BOOL force_preload) { - IWineD3DSurfaceImpl *depth_stencil_impl = (IWineD3DSurfaceImpl *)depth_stencil; + IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + const IWineD3DSurfaceImpl *surface_impl = (IWineD3DSurfaceImpl *)surface; + IWineD3DBaseTextureImpl *texture_impl; + BOOL update_minfilter, update_magfilter; - if (use_render_buffer && depth_stencil_impl->current_renderbuffer) + /* Update base texture states array */ + if (SUCCEEDED(IWineD3DSurface_GetContainer(surface, &IID_IWineD3DBaseTexture, (void **)&texture_impl))) { - GL_EXTCALL(glFramebufferRenderbufferEXT(fbo_target, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depth_stencil_impl->current_renderbuffer->id)); - checkGLcall("glFramebufferRenderbufferEXT()"); - } else { - IWineD3DBaseTextureImpl *texture_impl; - GLenum texttarget, target; - GLint old_binding = 0; + if (texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] != WINED3DTEXF_POINT) + { + texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; + update_minfilter = TRUE; + } + + if (texture_impl->baseTexture.states[WINED3DTEXSTA_MAGFILTER] != WINED3DTEXF_POINT) + { + texture_impl->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; + update_magfilter = TRUE; + } + + if (texture_impl->baseTexture.bindCount) + { + WARN("Render targets should not be bound to a sampler\n"); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(texture_impl->baseTexture.sampler)); + } - texttarget = depth_stencil_impl->glDescription.target; - if (texttarget == GL_TEXTURE_2D) + IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture_impl); + } + + if (update_minfilter || update_magfilter || force_preload) + { + GLenum target, bind_target; + GLint old_binding; + + target = surface_impl->glDescription.target; + if (target == GL_TEXTURE_2D) { - target = GL_TEXTURE_2D; + bind_target = GL_TEXTURE_2D; glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); - } else if (texttarget == GL_TEXTURE_RECTANGLE_ARB) { - target = GL_TEXTURE_RECTANGLE_ARB; + } else if (target == GL_TEXTURE_RECTANGLE_ARB) { + bind_target = GL_TEXTURE_RECTANGLE_ARB; glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding); } else { - target = GL_TEXTURE_CUBE_MAP_ARB; + bind_target = GL_TEXTURE_CUBE_MAP_ARB; glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARB, &old_binding); } - IWineD3DSurface_PreLoad(depth_stencil); + IWineD3DSurface_PreLoad(surface); - glBindTexture(target, depth_stencil_impl->glDescription.textureName); - glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE); - glBindTexture(target, old_binding); + glBindTexture(bind_target, surface_impl->glDescription.textureName); + if (update_minfilter) glTexParameteri(bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + if (update_magfilter) glTexParameteri(bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glBindTexture(bind_target, old_binding); + } - /* Update base texture states array */ - if (SUCCEEDED(IWineD3DSurface_GetContainer(depth_stencil, &IID_IWineD3DBaseTexture, (void **)&texture_impl))) - { - texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; - texture_impl->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; - if (texture_impl->baseTexture.bindCount) - { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(texture_impl->baseTexture.sampler)); - } + checkGLcall("apply_attachment_filter_states()"); +} - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture_impl); - } +/* TODO: Handle stencil attachments */ +void context_attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer) +{ + IWineD3DSurfaceImpl *depth_stencil_impl = (IWineD3DSurfaceImpl *)depth_stencil; + + if (use_render_buffer && depth_stencil_impl->current_renderbuffer) + { + GL_EXTCALL(glFramebufferRenderbufferEXT(fbo_target, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depth_stencil_impl->current_renderbuffer->id)); + checkGLcall("glFramebufferRenderbufferEXT()"); + } else { + context_apply_attachment_filter_states((IWineD3DDevice *)This, depth_stencil, TRUE); - GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_DEPTH_ATTACHMENT_EXT, texttarget, + GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_DEPTH_ATTACHMENT_EXT, depth_stencil_impl->glDescription.target, depth_stencil_impl->glDescription.textureName, depth_stencil_impl->glDescription.level)); checkGLcall("glFramebufferTexture2DEXT()"); } @@ -129,44 +153,10 @@ void context_attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_targe void context_attach_surface_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, DWORD idx, IWineD3DSurface *surface) { const IWineD3DSurfaceImpl *surface_impl = (IWineD3DSurfaceImpl *)surface; - IWineD3DBaseTextureImpl *texture_impl; - GLenum texttarget, target; - GLint old_binding; - texttarget = surface_impl->glDescription.target; - if (texttarget == GL_TEXTURE_2D) - { - target = GL_TEXTURE_2D; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding); - } else if (texttarget == GL_TEXTURE_RECTANGLE_ARB) { - target = GL_TEXTURE_RECTANGLE_ARB; - glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding); - } else { - target = GL_TEXTURE_CUBE_MAP_ARB; - glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARB, &old_binding); - } - - IWineD3DSurface_PreLoad(surface); - - glBindTexture(target, surface_impl->glDescription.textureName); - glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glBindTexture(target, old_binding); - - /* Update base texture states array */ - if (SUCCEEDED(IWineD3DSurface_GetContainer(surface, &IID_IWineD3DBaseTexture, (void **)&texture_impl))) - { - texture_impl->baseTexture.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; - texture_impl->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; - if (texture_impl->baseTexture.bindCount) - { - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SAMPLER(texture_impl->baseTexture.sampler)); - } - - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture_impl); - } + context_apply_attachment_filter_states((IWineD3DDevice *)This, surface, TRUE); - GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT + idx, texttarget, + GL_EXTCALL(glFramebufferTexture2DEXT(fbo_target, GL_COLOR_ATTACHMENT0_EXT + idx, surface_impl->glDescription.target, surface_impl->glDescription.textureName, surface_impl->glDescription.level)); checkGLcall("attach_surface_fbo");
1
0
0
0
Henri Verbeet : wined3d: Move FBO handling functions to context.c.
by Alexandre Julliard
19 Sep '08
19 Sep '08
Module: wine Branch: master Commit: a269236649fb742f2e945eb8b0b58409dc070284 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a269236649fb742f2e945eb8b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Sep 18 14:57:53 2008 +0200 wined3d: Move FBO handling functions to context.c. --- dlls/wined3d/context.c | 293 ++++++++++++++++++++++++++++++++++++---- dlls/wined3d/device.c | 228 +------------------------------ dlls/wined3d/surface.c | 6 +- dlls/wined3d/wined3d_private.h | 7 +- 4 files changed, 282 insertions(+), 252 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a269236649fb742f2e945…
1
0
0
0
Rob Shearman : widl: Don' t automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs .
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: 2e8dec4115b9058c0cdf096ba8bd7bb14128c028 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2e8dec4115b9058c0cdf096ba…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Sep 18 12:37:35 2008 +0100 widl: Don't automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs. It doesn't match what MIDL does. --- tools/widl/header.c | 22 +--------------------- 1 files changed, 1 insertions(+), 21 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index 0d9832d..83fef7f 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -150,28 +150,8 @@ static void write_field(FILE *h, var_t *v) { if (!v) return; if (v->type) { - const char *name = v->name; - if (name == NULL) { - switch (v->type->type) { - case RPC_FC_STRUCT: - case RPC_FC_CVSTRUCT: - case RPC_FC_CPSTRUCT: - case RPC_FC_CSTRUCT: - case RPC_FC_PSTRUCT: - case RPC_FC_BOGUS_STRUCT: - case RPC_FC_ENCAPSULATED_UNION: - name = "DUMMYSTRUCTNAME"; - break; - case RPC_FC_NON_ENCAPSULATED_UNION: - name = "DUMMYUNIONNAME"; - break; - default: - /* ? */ - break; - } - } indent(h, 0); - write_type_def_or_decl(h, v->type, TRUE, "%s", name); + write_type_def_or_decl(h, v->type, TRUE, "%s", v->name); fprintf(h, ";\n"); } }
1
0
0
0
Rob Shearman : include: Add explicit DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions in IDL files .
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: d9b84d2c454eafee2b0ca7d80b1771edd5658c16 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d9b84d2c454eafee2b0ca7d80…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Thu Sep 18 12:36:32 2008 +0100 include: Add explicit DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions in IDL files. These aren't present in the PSDK versions of these files but are necessary for us to be able to compile Wine with compilers that don't support anonymous structs and unions. --- include/amvideo.idl | 2 +- include/d3d10.idl | 6 +++--- include/imnxport.idl | 4 ++-- include/objidl.idl | 2 +- include/propidl.idl | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/amvideo.idl b/include/amvideo.idl index 37d06ff..ea486d5 100644 --- a/include/amvideo.idl +++ b/include/amvideo.idl @@ -204,7 +204,7 @@ typedef struct tagVIDEOINFO RGBQUAD bmiColors[iPALETTE_COLORS]; DWORD dwBitMasks[iMASK_COLORS]; TRUECOLORINFO TrueColorInfo; - }; + } DUMMYUNIONNAME; } VIDEOINFO; typedef struct tagMPEG1VIDEOINFO diff --git a/include/d3d10.idl b/include/d3d10.idl index 120f884..032063f 100644 --- a/include/d3d10.idl +++ b/include/d3d10.idl @@ -560,7 +560,7 @@ typedef struct D3D10_DEPTH_STENCIL_VIEW_DESC { D3D10_TEX2D_ARRAY_DSV Texture2DArray; D3D10_TEX2DMS_DSV Texture2DMS; D3D10_TEX2DMS_ARRAY_DSV Texture2DMSArray; - }; + } DUMMYUNIONNAME; } D3D10_DEPTH_STENCIL_VIEW_DESC; typedef enum D3D10_RTV_DIMENSION { @@ -627,7 +627,7 @@ typedef struct D3D10_RENDER_TARGET_VIEW_DESC { D3D10_TEX2DMS_RTV Texture2DMS; D3D10_TEX2DMS_ARRAY_RTV Texture2DMSArray; D3D10_TEX3D_RTV Texture3D; - }; + } DUMMYUNIONNAME; } D3D10_RENDER_TARGET_VIEW_DESC; typedef enum D3D10_SRV_DIMENSION { @@ -704,7 +704,7 @@ typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC { D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray; D3D10_TEX3D_SRV Texture3D; D3D10_TEXCUBE_SRV TextureCube; - }; + } DUMMYUNIONNAME; } D3D10_SHADER_RESOURCE_VIEW_DESC; typedef struct D3D10_BOX { diff --git a/include/imnxport.idl b/include/imnxport.idl index 50f3e4e..baf29d3 100644 --- a/include/imnxport.idl +++ b/include/imnxport.idl @@ -433,7 +433,7 @@ interface ISMTPCallback : ITransportCallback { [case(SMTP_SEND_STREAM)] SMTPSTREAM rStreamInfo; [default]; - }; + } DUMMYUNIONNAME; } SMTPRESPONSE, *LPSMTPRESPONSE; HRESULT OnResponse( @@ -604,7 +604,7 @@ interface IPOP3Callback : ITransportCallback [case(POP3_RETR)] POP3RETR rRetrInfo; [case(POP3_TOP)] POP3TOP rTopInfo; [default]; - }; + } DUMMYUNIONNAME; } POP3RESPONSE, *LPPOP3RESPONSE; HRESULT OnResponse( diff --git a/include/objidl.idl b/include/objidl.idl index e0d83fa..b3dcf65 100644 --- a/include/objidl.idl +++ b/include/objidl.idl @@ -1424,7 +1424,7 @@ interface IAdviseSink : IUnknown case TYMED_FILE: LPOLESTR lpszFileName; case TYMED_ISTREAM: BYTE_BLOB *pstm; case TYMED_ISTORAGE: BYTE_BLOB *pstg; - }; + } DUMMYUNIONNAME; IUnknown *pUnkForRelease; } userSTGMEDIUM; diff --git a/include/propidl.idl b/include/propidl.idl index 6720988..be67394 100644 --- a/include/propidl.idl +++ b/include/propidl.idl @@ -201,7 +201,7 @@ interface IPropertyStorage : IUnknown [case(VT_BYREF|VT_DISPATCH)] IDispatch **ppdispVal; [case(VT_BYREF|VT_ARRAY)] LPSAFEARRAY *pparray; [case(VT_BYREF|VT_VARIANT)] PROPVARIANT *pvarVal; - }; + } DUMMYUNIONNAME; }; typedef struct tagPROPVARIANT *LPPROPVARIANT; @@ -255,7 +255,7 @@ interface IPropertyStorage : IUnknown [case(PRSPEC_PROPID)] PROPID propid; [case(PRSPEC_LPWSTR)] LPOLESTR lpwstr; [default] ; - }; + } DUMMYUNIONNAME; } PROPSPEC; typedef struct tagSTATPROPSTG {
1
0
0
0
Huw Davies : gdi32: Factor out the name table lookup into a separate function.
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: 2f8f3faccea200c467529b36a93cb4a46a224004 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f8f3faccea200c467529b36a…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Sep 18 12:23:08 2008 +0100 gdi32: Factor out the name table lookup into a separate function. --- dlls/gdi32/freetype.c | 67 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 48 insertions(+), 19 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index dcd60e3..145be9b 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1026,11 +1026,19 @@ static void LoadSubstList(void) } } -static WCHAR *get_familyname(FT_Face ft_face) + +/***************************************************************** + * get_name_table_entry + * + * Supply the platform, encoding, language and name ids in req + * and if the name exists the function will fill in the string + * and string_len members. The string is owned by FreeType so + * don't free it. Returns TRUE if the name is found else FALSE. + */ +static BOOL get_name_table_entry(FT_Face ft_face, FT_SfntName *req) { - WCHAR *family = NULL; FT_SfntName name; - FT_UInt num_names, name_index, i; + FT_UInt num_names, name_index; if(FT_IS_SFNT(ft_face)) { @@ -1040,28 +1048,49 @@ static WCHAR *get_familyname(FT_Face ft_face) { if(!pFT_Get_Sfnt_Name(ft_face, name_index, &name)) { - if((name.name_id == TT_NAME_ID_FONT_FAMILY) && - (name.language_id == GetUserDefaultLCID()) && - (name.platform_id == TT_PLATFORM_MICROSOFT) && - (name.encoding_id == TT_MS_ID_UNICODE_CS)) + if((name.platform_id == req->platform_id) && + (name.encoding_id == req->encoding_id) && + (name.language_id == req->language_id) && + (name.name_id == req->name_id)) { - /* String is not nul terminated and string_len is a byte length. */ - family = HeapAlloc(GetProcessHeap(), 0, name.string_len + 2); - for(i = 0; i < name.string_len / 2; i++) - { - WORD *tmp = (WORD *)&name.string[i * 2]; - family[i] = GET_BE_WORD(*tmp); - } - family[i] = 0; - - TRACE("Got localised name %s\n", debugstr_w(family)); - return family; + req->string = name.string; + req->string_len = name.string_len; + return TRUE; } } } } + req->string = NULL; + req->string_len = 0; + return FALSE; +} - return NULL; +static WCHAR *get_familyname(FT_Face ft_face) +{ + WCHAR *family = NULL; + FT_SfntName name; + + name.platform_id = TT_PLATFORM_MICROSOFT; + name.encoding_id = TT_MS_ID_UNICODE_CS; + name.language_id = GetUserDefaultLCID(); + name.name_id = TT_NAME_ID_FONT_FAMILY; + + if(get_name_table_entry(ft_face, &name)) + { + int i; + + /* String is not nul terminated and string_len is a byte length. */ + family = HeapAlloc(GetProcessHeap(), 0, name.string_len + 2); + for(i = 0; i < name.string_len / 2; i++) + { + WORD *tmp = (WORD *)&name.string[i * 2]; + family[i] = GET_BE_WORD(*tmp); + } + family[i] = 0; + TRACE("Got localised name %s\n", debugstr_w(family)); + } + + return family; }
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLBody get/put_Text.
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: 995835e113651ff2b6eaa5abd5fcd68f03ddbaf7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=995835e113651ff2b6eaa5abd…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Sep 17 20:41:47 2008 +1000 mshtml: Implement IHTMLBody get/put_Text. --- dlls/mshtml/htmlbody.c | 39 +++++++++++++++++++++++++++++++++++---- dlls/mshtml/tests/dom.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index 140a0a5..9fad187 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -300,15 +300,46 @@ static HRESULT WINAPI HTMLBodyElement_get_bgColor(IHTMLBodyElement *iface, VARIA static HRESULT WINAPI HTMLBodyElement_put_text(IHTMLBodyElement *iface, VARIANT v) { HTMLBodyElement *This = HTMLBODY_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + nsAString text; + nsresult nsres; + + TRACE("(%p)->(v%d)\n", This, V_VT(&v)); + + if(!variant_to_nscolor(&v, &text)) + return S_OK; + + nsres = nsIDOMHTMLBodyElement_SetText(This->nsbody, &text); + nsAString_Finish(&text); + + return S_OK; } static HRESULT WINAPI HTMLBodyElement_get_text(IHTMLBodyElement *iface, VARIANT *p) { HTMLBodyElement *This = HTMLBODY_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString text; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&text, NULL); + + V_VT(p) = VT_BSTR; + V_BSTR(p) = NULL; + + nsres = nsIDOMHTMLBodyElement_GetText(This->nsbody, &text); + if(NS_SUCCEEDED(nsres)) + { + const PRUnichar *sText; + nsAString_GetData(&text, &sText); + + V_VT(p) = VT_BSTR; + V_BSTR(p) = SysAllocString(sText); + } + + nsAString_Finish(&text); + + return S_OK; } static HRESULT WINAPI HTMLBodyElement_put_link(IHTMLBodyElement *iface, VARIANT v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 35cd291..56c5057 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2064,6 +2064,10 @@ static void test_default_body(IHTMLBodyElement *body) long l; BSTR bstr; HRESULT hres; + VARIANT v; + WCHAR sBodyText[] = {'#','F','F','0','0','0','0',0}; + WCHAR sTextInvalid[] = {'I','n','v','a','l','i','d',0}; + WCHAR sResInvalid[] = {'#','0','0','a','0','d','0',0}; bstr = (void*)0xdeadbeef; hres = IHTMLBodyElement_get_background(body, &bstr); @@ -2077,6 +2081,39 @@ static void test_default_body(IHTMLBodyElement *body) l = elem_get_scroll_top((IUnknown*)body); ok(!l, "scrollTop = %ld\n", l); elem_get_scroll_left((IUnknown*)body); + + /* get_text tests */ + hres = IHTMLBodyElement_get_text(body, &v); + ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres); + ok(V_VT(&v) == VT_BSTR, "Expected VT_BSTR got %d\n", V_VT(&v)); + ok(bstr == NULL, "bstr != NULL\n"); + + + /* get_text - Invalid Text */ + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = SysAllocString(sTextInvalid); + hres = IHTMLBodyElement_put_text(body, v); + ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres); + + V_VT(&v) = VT_NULL; + hres = IHTMLBodyElement_get_text(body, &v); + ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres); + ok(V_VT(&v) == VT_BSTR, "Expected VT_BSTR got %d\n", V_VT(&v)); + ok(!lstrcmpW(sResInvalid, V_BSTR(&v)), "bstr != sResInvalid\n"); + VariantClear(&v); + + /* get_text - Valid Text */ + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = SysAllocString(sBodyText); + hres = IHTMLBodyElement_put_text(body, v); + ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres); + + V_VT(&v) = VT_NULL; + hres = IHTMLBodyElement_get_text(body, &v); + ok(hres == S_OK, "expect S_OK got 0x%08d\n", hres); + ok(V_VT(&v) == VT_BSTR, "Expected VT_BSTR got %d\n", V_VT(&v)); + ok(lstrcmpW(bstr, V_BSTR(&v)), "bstr != V_BSTR(&v)\n"); + VariantClear(&v); } static void test_body_funs(IHTMLBodyElement *body)
1
0
0
0
Alistair Leslie-Hughes : msxml3: Correct IDispatchEx Invoke to return the correct object.
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: b64b5ea5ea8044c9a444ae109570e4e033750f74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b64b5ea5ea8044c9a444ae109…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Sep 17 20:14:24 2008 +1000 msxml3: Correct IDispatchEx Invoke to return the correct object. --- dlls/msxml3/queryresult.c | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/dlls/msxml3/queryresult.c b/dlls/msxml3/queryresult.c index f30172d..56c1a53 100644 --- a/dlls/msxml3/queryresult.c +++ b/dlls/msxml3/queryresult.c @@ -65,6 +65,8 @@ static inline queryresult *impl_from_IXMLDOMNodeList( IXMLDOMNodeList *iface ) return (queryresult *)((char*)iface - FIELD_OFFSET(queryresult, lpVtbl)); } +#define XMLQUERYRES(x) ((IXMLDOMNodeList*)&(x)->lpVtbl) + static HRESULT WINAPI queryresult_QueryInterface( IXMLDOMNodeList *iface, REFIID riid, @@ -326,13 +328,28 @@ static HRESULT queryresult_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fl { queryresult *This = impl_from_IXMLDOMNodeList( (IXMLDOMNodeList*)iface ); - if(flags != DISPATCH_PROPERTYGET) { - FIXME("flags %x\n", flags); - return E_NOTIMPL; - } + TRACE("(%p)->(%x %x %x %p %p %p)\n", This, id, lcid, flags, params, res, ei); V_VT(res) = VT_DISPATCH; - V_DISPATCH(res) = (IDispatch*)create_node(This->result->nodesetval->nodeTab[This->resultPos]); + V_DISPATCH(res) = NULL; + + switch(flags) + { + case INVOKE_PROPERTYGET: + { + IXMLDOMNode *disp = NULL; + + queryresult_get_item(XMLQUERYRES(This), id - MSXML_DISPID_CUSTOM_MIN, &disp); + V_DISPATCH(res) = (IDispatch*)&disp; + break; + } + default: + { + FIXME("unimplemented flags %x\n", flags); + break; + } + } + return S_OK; }
1
0
0
0
Vitaly Lipatov : wineboot: Do registry update with wineboot --update in any case.
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: 977b7d398e1eaa13dfaf9f11dbaf3e70678b3449 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=977b7d398e1eaa13dfaf9f11d…
Author: Vitaly Lipatov <lav(a)etersoft.ru> Date: Wed Sep 17 16:58:52 2008 +0400 wineboot: Do registry update with wineboot --update in any case. --- programs/wineboot/wineboot.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 717a175..2201ed5 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -115,7 +115,7 @@ static char *get_wine_inf_path(void) } /* update the timestamp if different from the reference time */ -static BOOL update_timestamp( const char *config_dir, unsigned long timestamp, int force ) +static BOOL update_timestamp( const char *config_dir, unsigned long timestamp ) { BOOL ret = FALSE; int fd, count; @@ -132,7 +132,7 @@ static BOOL update_timestamp( const char *config_dir, unsigned long timestamp, i { buffer[count] = 0; if (!strncmp( buffer, "disable", sizeof("disable")-1 )) goto done; - if (!force && timestamp == strtoul( buffer, NULL, 10 )) goto done; + if (timestamp == strtoul( buffer, NULL, 10 )) goto done; } lseek( fd, 0, SEEK_SET ); ftruncate( fd, 0 ); @@ -681,7 +681,7 @@ static void update_wineprefix( int force ) goto done; } - if (update_timestamp( config_dir, st.st_mtime, force )) + if (update_timestamp( config_dir, st.st_mtime ) || force) { WCHAR *buffer; DWORD len = MultiByteToWideChar( CP_UNIXCP, 0, inf_path, -1, NULL, 0 );
1
0
0
0
Jan de Mooij : comctl32/treeview: Fix pszText NULL pointer dereference.
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: 403221c2281197630f0c6479e818bc2b02dd2b3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=403221c2281197630f0c6479e…
Author: Jan de Mooij <jandemooij(a)gmail.com> Date: Tue Sep 16 11:25:18 2008 +0200 comctl32/treeview: Fix pszText NULL pointer dereference. --- dlls/comctl32/tests/treeview.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/treeview.c | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 68 insertions(+), 11 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index c1ba7f3..a873e3c 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -64,6 +64,13 @@ static const struct message DoTest2Seq[] = { { 0 } }; +static const struct message DoTest3Seq[] = { + { TVM_INSERTITEM, sent }, + { TVM_GETITEM, sent }, + { TVM_DELETEITEM, sent }, + { 0 } +}; + static const struct message DoFocusTestSeq[] = { { TVM_INSERTITEM, sent }, { TVM_INSERTITEM, sent }, @@ -295,6 +302,35 @@ static void DoTest2(void) ok(!strcmp(sequence, "1(nR)nR23(RC)RC45(CR)CR."), "root-child select test\n"); } +static void DoTest3(void) +{ + TVINSERTSTRUCTA ins; + HTREEITEM hChild; + TVITEM tvi; + + int nBufferSize = 80; + CHAR szBuffer[80] = "Blah"; + + /* add an item without TVIF_TEXT mask and pszText == NULL */ + ins.hParent = hRoot; + ins.hInsertAfter = TVI_ROOT; + U(ins).item.mask = 0; + U(ins).item.pszText = NULL; + U(ins).item.cchTextMax = 0; + hChild = TreeView_InsertItem(hTree, &ins); + assert(hChild); + + /* retrieve it with TVIF_TEXT mask */ + tvi.hItem = hChild; + tvi.mask = TVIF_TEXT; + tvi.cchTextMax = nBufferSize; + tvi.pszText = szBuffer; + + SendMessageA( hTree, TVM_GETITEM, 0, (LPARAM)&tvi ); + ok(!strcmp(szBuffer, ""), "szBuffer=\"%s\", expected \"\"\n", szBuffer); + ok(SendMessageA(hTree, TVM_DELETEITEM, 0, (LPARAM)hChild), "DeleteItem failed\n"); +} + static void DoFocusTest(void) { TVINSERTSTRUCTA ins; @@ -700,6 +736,10 @@ START_TEST(treeview) ok_sequence(MsgSequences, LISTVIEW_SEQ_INDEX, DoTest2Seq, "DoTest2", FALSE); flush_sequences(MsgSequences, NUM_MSG_SEQUENCES); + DoTest3(); + ok_sequence(MsgSequences, LISTVIEW_SEQ_INDEX, DoTest3Seq, "DoTest3", FALSE); + + flush_sequences(MsgSequences, NUM_MSG_SEQUENCES); DoFocusTest(); ok_sequence(MsgSequences, LISTVIEW_SEQ_INDEX, DoFocusTestSeq, "DoFocusTest", TRUE); diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index a77792d..dabe5d9 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -23,8 +23,7 @@ * * Note that TREEVIEW_INFO * and HTREEITEM are the same thing. * - * Note2: All items always! have valid (allocated) pszText field. - * If item's text == LPSTR_TEXTCALLBACKA we allocate buffer + * Note2: If item's text == LPSTR_TEXTCALLBACKA we allocate buffer * of size TEXT_CALLBACK_SIZE in DoSetItem. * We use callbackMask to keep track of fields to be updated. * @@ -2083,7 +2082,12 @@ TREEVIEW_GetItemT(const TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem, BOOL isW) if (tvItem->mask & TVIF_TEXT) { - if (isW) + if (wineItem->pszText == NULL) + { + if (tvItem->cchTextMax > 0) + tvItem->pszText[0] = '\0'; + } + else if (isW) { if (wineItem->pszText == LPSTR_TEXTCALLBACKW) { @@ -3662,8 +3666,11 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) } /* Get string length in pixels */ - GetTextExtentPoint32W(hdc, editItem->pszText, strlenW(editItem->pszText), - &sz); + if (editItem->pszText) + GetTextExtentPoint32W(hdc, editItem->pszText, strlenW(editItem->pszText), + &sz); + else + GetTextExtentPoint32A(hdc, "", 0, &sz); /* Add Extra spacing for the next character */ GetTextMetricsW(hdc, &textMetric); @@ -3712,7 +3719,10 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem) } infoPtr->selectedItem = hItem; - SetWindowTextW(hwndEdit, editItem->pszText); + + if (editItem->pszText) + SetWindowTextW(hwndEdit, editItem->pszText); + SetFocus(hwndEdit); SendMessageW(hwndEdit, EM_SETSEL, 0, -1); ShowWindow(hwndEdit, SW_SHOW); @@ -4186,10 +4196,14 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, LPARAM lParam) hdc = CreateCompatibleDC(htopdc); hOldFont = SelectObject(hdc, infoPtr->hFont); - GetTextExtentPoint32W(hdc, dragItem->pszText, strlenW(dragItem->pszText), + + if (dragItem->pszText) + GetTextExtentPoint32W(hdc, dragItem->pszText, strlenW(dragItem->pszText), &size); - TRACE("%d %d %s %d\n", size.cx, size.cy, debugstr_w(dragItem->pszText), - strlenW(dragItem->pszText)); + else + GetTextExtentPoint32A(hdc, "", 0, &size); + + TRACE("%d %d %s\n", size.cx, size.cy, debugstr_w(dragItem->pszText)); hbmp = CreateCompatibleBitmap(htopdc, size.cx, size.cy); hOldbmp = SelectObject(hdc, hbmp); @@ -4210,8 +4224,11 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, LPARAM lParam) /* draw item text */ SetRect(&rc, cx, 0, size.cx, size.cy); - DrawTextW(hdc, dragItem->pszText, strlenW(dragItem->pszText), &rc, - DT_LEFT); + + if (dragItem->pszText) + DrawTextW(hdc, dragItem->pszText, strlenW(dragItem->pszText), &rc, + DT_LEFT); + SelectObject(hdc, hOldFont); SelectObject(hdc, hOldbmp);
1
0
0
0
Mikołaj Zalewski : shell32: autocomplete: Remove some obsolete FIXMEs, update some comments.
by Alexandre Julliard
18 Sep '08
18 Sep '08
Module: wine Branch: master Commit: a72fbdd023b7aa6fee4f6aafffc49ea70b4211c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a72fbdd023b7aa6fee4f6aaff…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Wed Sep 17 21:46:40 2008 +0200 shell32: autocomplete: Remove some obsolete FIXMEs, update some comments. --- dlls/shell32/autocomplete.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c index da11b25..f64dbec 100644 --- a/dlls/shell32/autocomplete.c +++ b/dlls/shell32/autocomplete.c @@ -31,6 +31,8 @@ - implement ACO_FILTERPREFIXES style - implement ACO_USETAB style - implement ACO_RTLREADING style + - implement ResetEnumerator + - string compares should be case-insensitive, the content of the list should be sorted */ #include "config.h" @@ -253,12 +255,9 @@ static HRESULT WINAPI IAutoComplete2_fnInit( TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", This, (long)hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete)); - if (This->options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n"); - if (This->options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n"); if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); - if (This->options & ACO_UPDOWNKEYDROPSLIST) TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n"); This->hwndEdit = hwndEdit;
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
122
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200