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 2024
----- 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
1 participants
705 discussions
Start a n
N
ew thread
Connor McAdams : uiautomationcore: NULL initialize SAFEARRAY variable passed to IRawElementProviderFragment::GetRuntimeId().
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 81057913cd6073bfbd9665d0d96f453c3dd5e995 URL:
https://gitlab.winehq.org/wine/wine/-/commit/81057913cd6073bfbd9665d0d96f45…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri May 31 12:06:54 2024 -0400 uiautomationcore: NULL initialize SAFEARRAY variable passed to IRawElementProviderFragment::GetRuntimeId(). Fixes a crash in
Battle.net
setup where success is returned but the variable is not set. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/uia_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/uiautomationcore/uia_client.c b/dlls/uiautomationcore/uia_client.c index df9b2b283e0..8d1e3c8c7dc 100644 --- a/dlls/uiautomationcore/uia_client.c +++ b/dlls/uiautomationcore/uia_client.c @@ -1542,7 +1542,7 @@ static HRESULT uia_provider_get_special_prop_val(struct uia_provider *prov, case UIA_RuntimeIdPropertyId: { IRawElementProviderFragment *elfrag; - SAFEARRAY *sa; + SAFEARRAY *sa = NULL; LONG lbound; int val;
1
0
0
0
Nikolay Sivov : d3dcompiler: Enable D3DCOMPILE_EFFECT_CHILD_EFFECT option.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 7eeddc3bea26a5eaaf1c5d509dea64be344b8a8b URL:
https://gitlab.winehq.org/wine/wine/-/commit/7eeddc3bea26a5eaaf1c5d509dea64…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri May 31 01:09:40 2024 +0200 d3dcompiler: Enable D3DCOMPILE_EFFECT_CHILD_EFFECT option. --- dlls/d3dcompiler_43/compiler.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 6a829ae43d7..6fffcfb82ab 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -457,7 +457,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen struct d3dcompiler_include_from_file include_from_file; struct vkd3d_shader_preprocess_info preprocess_info; struct vkd3d_shader_hlsl_source_info hlsl_info; - struct vkd3d_shader_compile_option options[5]; + struct vkd3d_shader_compile_option options[6]; struct vkd3d_shader_compile_info compile_info; struct vkd3d_shader_compile_option *option; struct vkd3d_shader_code byte_code; @@ -485,8 +485,8 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen { FIXME("Ignoring flags %#x.\n", flags); } - if (effect_flags) - FIXME("Ignoring effect flags %#x.\n", effect_flags); + if (effect_flags & ~D3DCOMPILE_EFFECT_CHILD_EFFECT) + FIXME("Ignoring effect flags %#x.\n", effect_flags & ~D3DCOMPILE_EFFECT_CHILD_EFFECT); if (secondary_flags) FIXME("Ignoring secondary flags %#x.\n", secondary_flags); @@ -557,6 +557,13 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES; } + if (effect_flags & D3DCOMPILE_EFFECT_CHILD_EFFECT) + { + option = &options[compile_info.option_count++]; + option->name = VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT; + option->value = true; + } + #if D3D_COMPILER_VERSION <= 39 option = &options[compile_info.option_count++]; option->name = VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS;
1
0
0
0
Nikolay Sivov : d3dcompiler/fx: Write empty buffers for compiler versions 33-39.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: adb1f54c0291f3378ac2b4dd8b6c517ad5c2fea8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/adb1f54c0291f3378ac2b4dd8b6c51…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri May 31 01:04:53 2024 +0200 d3dcompiler/fx: Write empty buffers for compiler versions 33-39. --- dlls/d3d10/tests/effect.c | 12 +++--------- dlls/d3dcompiler_43/compiler.c | 8 +++++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 534ea00fa17..572493e3a40 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -9912,10 +9912,8 @@ static void test_effect_compiler(void) cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 0); hr = cb->lpVtbl->GetDesc(cb, &var_desc); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name); + ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name); ID3D10Effect_Release(effect); ID3D10Blob_Release(blob); @@ -9936,21 +9934,17 @@ static void test_effect_compiler(void) cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 0); hr = cb->lpVtbl->GetDesc(cb, &var_desc); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name); cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 1); hr = cb->lpVtbl->GetDesc(cb, &var_desc); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(!strcmp(var_desc.Name, "cb1"), "Unexpected variable name %s.\n", var_desc.Name); + ok(!strcmp(var_desc.Name, "cb1"), "Unexpected variable name %s.\n", var_desc.Name); cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 2); hr = cb->lpVtbl->GetDesc(cb, &var_desc); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(!strcmp(var_desc.Name, "cb2"), "Unexpected variable name %s.\n", var_desc.Name); + ok(!strcmp(var_desc.Name, "cb2"), "Unexpected variable name %s.\n", var_desc.Name); ID3D10Effect_Release(effect); ID3D10Blob_Release(blob); diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 4b2b05df917..6a829ae43d7 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -457,7 +457,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen struct d3dcompiler_include_from_file include_from_file; struct vkd3d_shader_preprocess_info preprocess_info; struct vkd3d_shader_hlsl_source_info hlsl_info; - struct vkd3d_shader_compile_option options[4]; + struct vkd3d_shader_compile_option options[5]; struct vkd3d_shader_compile_info compile_info; struct vkd3d_shader_compile_option *option; struct vkd3d_shader_code byte_code; @@ -557,6 +557,12 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES; } +#if D3D_COMPILER_VERSION <= 39 + option = &options[compile_info.option_count++]; + option->name = VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS; + option->value = true; +#endif + ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages); if (ret)
1
0
0
0
Nikolay Sivov : gdi32/text: Make GetTextExtentExPointW() return sizes consistent with ExtTextOutW().
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 3c1462afa0acee45127fe610db1c8258016e8bec URL:
https://gitlab.winehq.org/wine/wine/-/commit/3c1462afa0acee45127fe610db1c82…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 28 02:21:29 2024 +0200 gdi32/text: Make GetTextExtentExPointW() return sizes consistent with ExtTextOutW(). Observable issue before this change is that text extent does not match size of ExtTextOutW() output. The fix is to shape text in similar way before measuring. Individual extents returned in this case are arguably useless, they do not match visual output order, and only give an idea on how much each input character contributed to overall width. To match input character order all intra-line and intra-item reordering is disabled. --- dlls/gdi32/text.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/text.c b/dlls/gdi32/text.c index b61c8ed4542..085c5e3afbe 100644 --- a/dlls/gdi32/text.c +++ b/dlls/gdi32/text.c @@ -71,6 +71,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(bidi); #define WINE_GCPW_LOOSE_RTL 3 #define WINE_GCPW_DIR_MASK 3 #define WINE_GCPW_LOOSE_MASK 2 +#define WINE_GCPW_DISABLE_REORDERING 0x10000000 #define odd(x) ((x) & 1) @@ -350,7 +351,8 @@ static BOOL BIDI_Reorder( HDC hDC, /* [in] Display DC */ INT uCountOut, /* [in] Size of output buffer */ UINT *lpOrder, /* [out] Logical -> Visual order map */ WORD **lpGlyphs, /* [out] reordered, mirrored, shaped glyphs to display */ - INT *cGlyphs ) /* [out] number of glyphs generated */ + INT *cGlyphs, /* [out] number of glyphs generated */ + WORD **cluster_map ) /* [out] cluster map for returned glyphs */ { WORD *chartype = NULL; BYTE *levels = NULL; @@ -588,19 +590,30 @@ static BOOL BIDI_Reorder( HDC hDC, /* [in] Display DC */ } for (j = 0; j < nItems; j++) + { runOrder[j] = pItems[j].a.s.uBidiLevel; + visOrder[j] = j; + if (dwWineGCP_Flags & WINE_GCPW_DISABLE_REORDERING) + pItems[j].a.fLogicalOrder = TRUE; + } - ScriptLayout(nItems, runOrder, visOrder, NULL); + if (!(dwWineGCP_Flags & WINE_GCPW_DISABLE_REORDERING)) + ScriptLayout(nItems, runOrder, visOrder, NULL); for (j = 0; j < nItems; j++) { + const WCHAR *text; + WORD *cluster_map; int k; int cChars,cOutGlyphs; + curItem = &pItems[visOrder[j]]; cChars = pItems[visOrder[j]+1].iCharPos - curItem->iCharPos; - res = ScriptShape(hDC, &psc, lpString + done + curItem->iCharPos, cChars, cMaxGlyphs, &curItem->a, run_glyphs, pwLogClust, psva, &cOutGlyphs); + text = lpString + done + curItem->iCharPos; + cluster_map = pwLogClust + done + curItem->iCharPos; + res = ScriptShape(hDC, &psc, text, cChars, cMaxGlyphs, &curItem->a, run_glyphs, cluster_map, psva, &cOutGlyphs); while (res == E_OUTOFMEMORY) { WORD *new_run_glyphs = HeapReAlloc(GetProcessHeap(), 0, run_glyphs, sizeof(*run_glyphs) * cMaxGlyphs * 2); @@ -621,7 +634,7 @@ static BOOL BIDI_Reorder( HDC hDC, /* [in] Display DC */ run_glyphs = new_run_glyphs; psva = new_psva; cMaxGlyphs *= 2; - res = ScriptShape(hDC, &psc, lpString + done + curItem->iCharPos, cChars, cMaxGlyphs, &curItem->a, run_glyphs, pwLogClust, psva, &cOutGlyphs); + res = ScriptShape(hDC, &psc, text, cChars, cMaxGlyphs, &curItem->a, run_glyphs, cluster_map, psva, &cOutGlyphs); } if (res) { @@ -653,6 +666,11 @@ static BOOL BIDI_Reorder( HDC hDC, /* [in] Display DC */ *lpGlyphs = new_glyphs; for (k = 0; k < cOutGlyphs; k++) (*lpGlyphs)[glyph_i+k] = run_glyphs[k]; + + /* Fix item cluster map indices to be usable with returned glyph array. */ + for (k = 0; k < cChars; ++k) + cluster_map[k] += glyph_i; + glyph_i += cOutGlyphs; } } @@ -664,6 +682,11 @@ static BOOL BIDI_Reorder( HDC hDC, /* [in] Display DC */ } if (cGlyphs) *cGlyphs = glyph_i; + if (cluster_map) + { + *cluster_map = pwLogClust; + pwLogClust = NULL; + } ret = TRUE; cleanup: @@ -952,7 +975,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect, ? WINE_GCPW_FORCE_RTL : WINE_GCPW_FORCE_LTR; BIDI_Reorder( hdc, str, count, GCP_REORDER, bidi_flags, NULL, 0, NULL, - &glyphs, &glyphs_count ); + &glyphs, &glyphs_count, NULL ); flags |= ETO_IGNORELANGUAGE; if (glyphs) @@ -1185,7 +1208,7 @@ DWORD WINAPI GetCharacterPlacementW( HDC hdc, const WCHAR *str, INT count, INT m else { BIDI_Reorder( NULL, str, count, flags, WINE_GCPW_FORCE_LTR, result->lpOutString, - set_cnt, result->lpOrder, NULL, NULL ); + set_cnt, result->lpOrder, NULL, NULL, NULL ); } if (flags & GCP_USEKERNING) @@ -1317,13 +1340,102 @@ INT WINAPI GetTextFaceW( HDC hdc, INT count, WCHAR *name ) return NtGdiGetTextFaceW( hdc, count, name, FALSE ); } +static unsigned int get_char_cluster_size(unsigned int start, unsigned int count, const WORD *cluster_map, + WORD *first_glyph, WORD *last_glyph) +{ + unsigned int i, size = 1; + + *first_glyph = cluster_map[start]; + *last_glyph = *first_glyph; + + for (i = start + 1; i < count; ++i) + { + if (cluster_map[i] != *first_glyph) + { + *last_glyph = cluster_map[i] - 1; + break; + } + size++; + } + + return size; +} + +static int get_cluster_extent(const INT *dxs, WORD first_glyph, WORD last_glyph) +{ + int extent = dxs[last_glyph]; + + if (first_glyph) + extent -= dxs[first_glyph - 1]; + return extent; +} + /*********************************************************************** * GetTextExtentExPointW (GDI32.@) */ BOOL WINAPI GetTextExtentExPointW( HDC hdc, const WCHAR *str, INT count, INT max_ext, INT *nfit, INT *dxs, SIZE *size ) { - return NtGdiGetTextExtentExW( hdc, str, count, max_ext, nfit, dxs, size, 0 ); + WORD *glyphs = NULL, *cluster_map = NULL; + unsigned int i, j; + DC_ATTR *dc_attr; + int glyphs_count; + UINT bidi_flags; + BOOL ret = TRUE; + + if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + + bidi_flags = dc_attr->text_align & TA_RTLREADING ? WINE_GCPW_FORCE_RTL : WINE_GCPW_FORCE_LTR; + bidi_flags |= WINE_GCPW_DISABLE_REORDERING; + + if (nfit) *nfit = 0; + + BIDI_Reorder( hdc, str, count, GCP_REORDER, bidi_flags, NULL, 0, NULL, + &glyphs, &glyphs_count, &cluster_map ); + + if (glyphs) + { + BOOL need_extents = dxs || nfit; + INT *glyph_dxs = NULL; + + if (need_extents) + { + if (!(glyph_dxs = HeapAlloc( GetProcessHeap(), 0, glyphs_count * sizeof(*glyph_dxs) ))) + ret = FALSE; + } + + if (ret) + ret = NtGdiGetTextExtentExW( hdc, glyphs, glyphs_count, 0, NULL, glyph_dxs, size, 1 ); + + if (ret && need_extents) + { + unsigned int cluster_size, cluster_extent; + WORD first_glyph, last_glyph; + int extents = 0; + + for (i = 0; i < count; i += cluster_size) + { + cluster_size = get_char_cluster_size(i, count, cluster_map, &first_glyph, &last_glyph); + cluster_extent = get_cluster_extent(glyph_dxs, first_glyph, last_glyph); + + if (extents + cluster_extent > max_ext) break; + if (nfit) *nfit += cluster_size; + + for (j = 0; j < cluster_size; ++j) + dxs[i + j] = extents + cluster_extent / cluster_size; + + extents += cluster_extent; + } + } + + HeapFree( GetProcessHeap(), 0, glyphs ); + HeapFree( GetProcessHeap(), 0, glyph_dxs ); + HeapFree( GetProcessHeap(), 0, cluster_map ); + } + else + ret = NtGdiGetTextExtentExW( hdc, str, count, max_ext, nfit, dxs, size, 0 ); + + return ret; } /***********************************************************************
1
0
0
0
Alexandre Julliard : msvcrt: Share a helper to find a catch block handler.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: b4d6270a51aa654f1f7fd7de3a12f565ec5cc97a URL:
https://gitlab.winehq.org/wine/wine/-/commit/b4d6270a51aa654f1f7fd7de3a12f5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 31 12:09:39 2024 +0200 msvcrt: Share a helper to find a catch block handler. --- dlls/msvcrt/cppexcept.h | 4 +++ dlls/msvcrt/except.c | 34 +++++++++++++++++++ dlls/msvcrt/except_i386.c | 81 ++++++++++++++++----------------------------- dlls/msvcrt/except_x86_64.c | 64 +++++++++++------------------------ 4 files changed, 85 insertions(+), 98 deletions(-)
1
0
0
0
Alexandre Julliard : msvcrt: Share the copy_exception() helper between platforms.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 8ed3d661e1d18e503b4916be65bbcf2f28e42872 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8ed3d661e1d18e503b4916be65bbcf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 31 12:08:59 2024 +0200 msvcrt: Share the copy_exception() helper between platforms. --- dlls/msvcrt/cppexcept.h | 31 +++++++++++++++++++++++++ dlls/msvcrt/except_i386.c | 33 ++------------------------ dlls/msvcrt/except_x86_64.c | 56 ++++++--------------------------------------- dlls/msvcrt/handler4.c | 54 ++++++------------------------------------- 4 files changed, 47 insertions(+), 127 deletions(-)
1
0
0
0
Alexandre Julliard : msvcrt: Share the find_caught_type() helper between platforms.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 28f5e7ac9ad054ec3c7723be4d718834c83d03c7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/28f5e7ac9ad054ec3c7723be4d7188…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 31 12:08:14 2024 +0200 msvcrt: Share the find_caught_type() helper between platforms. --- dlls/msvcrt/cppexcept.h | 27 +++++++++++++++++++++++++++ dlls/msvcrt/except_i386.c | 30 ++---------------------------- dlls/msvcrt/except_x86_64.c | 27 --------------------------- dlls/msvcrt/handler4.c | 26 -------------------------- 4 files changed, 29 insertions(+), 81 deletions(-) diff --git a/dlls/msvcrt/cppexcept.h b/dlls/msvcrt/cppexcept.h index ef8a2944c04..37a498c41d8 100644 --- a/dlls/msvcrt/cppexcept.h +++ b/dlls/msvcrt/cppexcept.h @@ -203,6 +203,33 @@ static inline void call_dtor( void *func, void *this ) } #endif +/* check if the exception type is caught by a given catch block, and return the type that matched */ +static inline const cxx_type_info *find_caught_type( cxx_exception_type *exc_type, uintptr_t base, + const type_info *catch_ti, UINT catch_flags ) +{ + const cxx_type_info_table *type_info_table = rtti_rva( exc_type->type_info_table, base ); + UINT i; + + for (i = 0; i < type_info_table->count; i++) + { + const cxx_type_info *type = rtti_rva( type_info_table->info[i], base ); + const type_info *ti = rtti_rva( type->type_info, base ); + + if (!catch_ti) return type; /* catch(...) matches any type */ + if (catch_ti != ti) + { + if (strcmp( catch_ti->mangled, ti->mangled )) continue; + } + /* type is the same, now check the flags */ + if ((exc_type->flags & TYPE_FLAG_CONST) && + !(catch_flags & TYPE_FLAG_CONST)) continue; + if ((exc_type->flags & TYPE_FLAG_VOLATILE) && + !(catch_flags & TYPE_FLAG_VOLATILE)) continue; + return type; /* it matched */ + } + return NULL; +} + #if _MSVCR_VER >= 80 #define EXCEPTION_MANGLED_NAME ".?AVexception@std@@" #else diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c index d20b08d00c3..c326b24d54c 100644 --- a/dlls/msvcrt/except_i386.c +++ b/dlls/msvcrt/except_i386.c @@ -206,32 +206,6 @@ static void dump_function_descr( const cxx_function_descr *descr ) TRACE( "flags: %08x\n", descr->flags ); } -/* check if the exception type is caught by a given catch block, and return the type that matched */ -static const cxx_type_info *find_caught_type( cxx_exception_type *exc_type, - const type_info *catch_ti, UINT catch_flags ) -{ - UINT i; - - for (i = 0; i < exc_type->type_info_table->count; i++) - { - const cxx_type_info *type = exc_type->type_info_table->info[i]; - - if (!catch_ti) return type; /* catch(...) matches any type */ - if (catch_ti != type->type_info) - { - if (strcmp( catch_ti->mangled, type->type_info->mangled )) continue; - } - /* type is the same, now check the flags */ - if ((exc_type->flags & TYPE_FLAG_CONST) && - !(catch_flags & TYPE_FLAG_CONST)) continue; - if ((exc_type->flags & TYPE_FLAG_VOLATILE) && - !(catch_flags & TYPE_FLAG_VOLATILE)) continue; - return type; /* it matched */ - } - return NULL; -} - - /* copy the exception object where the catch block wants it */ static void copy_exception( void *object, cxx_exception_frame *frame, const catchblock_info *catchblock, const cxx_type_info *type ) @@ -363,7 +337,7 @@ static inline void call_catch_block( PEXCEPTION_RECORD rec, CONTEXT *context, const catchblock_info *catchblock = &tryblock->catchblock[j]; if(info) { - const cxx_type_info *type = find_caught_type( info, + const cxx_type_info *type = find_caught_type( info, 0, catchblock->type_info, catchblock->flags ); if (!type) continue; @@ -444,7 +418,7 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs, if (!rec) return EXCEPTION_CONTINUE_SEARCH; } - type = find_caught_type( (cxx_exception_type*)rec->ExceptionInformation[2], ti, flags ); + type = find_caught_type( (cxx_exception_type*)rec->ExceptionInformation[2], 0, ti, flags ); if (!type) return EXCEPTION_CONTINUE_SEARCH; if (copy) diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c index ed82755e182..2afbdc821da 100644 --- a/dlls/msvcrt/except_x86_64.c +++ b/dlls/msvcrt/except_x86_64.c @@ -151,33 +151,6 @@ static inline int ip_to_state(ipmap_info *ipmap, UINT count, int ip) return ipmap[low].state; } -/* check if the exception type is caught by a given catch block, and return the type that matched */ -static const cxx_type_info *find_caught_type(cxx_exception_type *exc_type, ULONG64 exc_base, - const type_info *catch_ti, UINT catch_flags) -{ - const cxx_type_info_table *type_info_table = rva_to_ptr(exc_type->type_info_table, exc_base); - UINT i; - - for (i = 0; i < type_info_table->count; i++) - { - const cxx_type_info *type = rva_to_ptr(type_info_table->info[i], exc_base); - const type_info *ti = rva_to_ptr(type->type_info, exc_base); - - if (!catch_ti) return type; /* catch(...) matches any type */ - if (catch_ti != ti) - { - if (strcmp( catch_ti->mangled, ti->mangled )) continue; - } - /* type is the same, now check the flags */ - if ((exc_type->flags & TYPE_FLAG_CONST) && - !(catch_flags & TYPE_FLAG_CONST)) continue; - if ((exc_type->flags & TYPE_FLAG_VOLATILE) && - !(catch_flags & TYPE_FLAG_VOLATILE)) continue; - return type; /* it matched */ - } - return NULL; -} - static inline void copy_exception(void *object, ULONG64 frame, DISPATCHER_CONTEXT *dispatch, const catchblock_info *catchblock, diff --git a/dlls/msvcrt/handler4.c b/dlls/msvcrt/handler4.c index 560302d7d64..9bfde4b7ca2 100644 --- a/dlls/msvcrt/handler4.c +++ b/dlls/msvcrt/handler4.c @@ -359,32 +359,6 @@ static inline int ip_to_state4(BYTE *ip_map, UINT count, DISPATCHER_CONTEXT *dis return ret; } -static const cxx_type_info *find_caught_type(cxx_exception_type *exc_type, ULONG64 exc_base, - const type_info *catch_ti, UINT catch_flags) -{ - const cxx_type_info_table *type_info_table = rva_to_ptr(exc_type->type_info_table, exc_base); - UINT i; - - for (i = 0; i < type_info_table->count; i++) - { - const cxx_type_info *type = rva_to_ptr(type_info_table->info[i], exc_base); - const type_info *ti = rva_to_ptr(type->type_info, exc_base); - - if (!catch_ti) return type; /* catch(...) matches any type */ - if (catch_ti != ti) - { - if (strcmp( catch_ti->mangled, ti->mangled )) continue; - } - /* type is the same, now check the flags */ - if ((exc_type->flags & TYPE_FLAG_CONST) && - !(catch_flags & TYPE_FLAG_CONST)) continue; - if ((exc_type->flags & TYPE_FLAG_VOLATILE) && - !(catch_flags & TYPE_FLAG_VOLATILE)) continue; - return type; /* it matched */ - } - return NULL; -} - static inline void copy_exception(void *object, ULONG64 frame, DISPATCHER_CONTEXT *dispatch, const catchblock_info_v4 *catchblock, const cxx_type_info *type, ULONG64 exc_base) {
1
0
0
0
Alexandre Julliard : msvcrt: Move common exception handling types to the header.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: f3a35da445953cb48cf1854129fec0a96085de24 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f3a35da445953cb48cf1854129fec0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 31 12:07:02 2024 +0200 msvcrt: Move common exception handling types to the header. --- dlls/msvcrt/cppexcept.h | 109 +++++++++++++++++++++++++++++++++++++++----- dlls/msvcrt/except_i386.c | 48 ++----------------- dlls/msvcrt/except_x86_64.c | 47 ------------------- dlls/msvcrt/handler4.c | 61 +++++++++---------------- 4 files changed, 123 insertions(+), 142 deletions(-)
1
0
0
0
Alistair Leslie-Hughes : include: Add missing TreeView_* defines.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 6f927b9e93f164c973c46200452109abe2aa79b4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6f927b9e93f164c973c46200452109…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri May 31 18:32:14 2024 +1000 include: Add missing TreeView_* defines. --- include/commctrl.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/commctrl.h b/include/commctrl.h index 7c5b09f6e72..ece751a0d35 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3022,6 +3022,8 @@ typedef struct tagTVKEYDOWN #define TreeView_GetCheckState(hwndTV, hti) \ ((((UINT)(SNDMSG((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \ TVIS_STATEIMAGEMASK))) >> 12) -1) +#define TreeView_SetCheckState(hwndTV, hti, check) \ + TreeView_SetItemState(hwndTV, hti, INDEXTOSTATEIMAGEMASK((check) ? 2 : 1), TVIS_STATEIMAGEMASK) #define TreeView_SetLineColor(hwnd, clr) \ (COLORREF)SNDMSG((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr)) @@ -3040,6 +3042,34 @@ typedef struct tagTVKEYDOWN #define TreeView_GetUnicodeFormat(hwnd) \ (BOOL)SNDMSG((hwnd), TVM_GETUNICODEFORMAT, 0, 0) +#define TreeView_SetExtendedStyle(hwnd, style, mask) \ + (DWORD)SNDMSG((hwnd), TVM_SETEXTENDEDSTYLE, mask, style) + +#define TreeView_GetExtendedStyle(hwnd) \ + (DWORD)SNDMSG((hwnd), TVM_GETEXTENDEDSTYLE, 0, 0) + +#define TreeView_SetAutoScrollInfo(hwnd, pps, updatetime) \ + SNDMSG((hwnd), TVM_SETAUTOSCROLLINFO, (WPARAM)(pps), (LPARAM)(updatetime)) + +#define TreeView_SetHot(hwnd, hitem) \ + SNDMSG((hwnd), TVM_SETHOT, 0, (LPARAM)(hitem)) + +#define TreeView_GetSelectedCount(hwnd) \ + (DWORD)SNDMSG((hwnd), TVM_GETSELECTEDCOUNT, 0, 0) + +#define TreeView_ShowInfoTip(hwnd, hitem) \ + (DWORD)SNDMSG((hwnd), TVM_SHOWINFOTIP, 0, (LPARAM)(hitem)) + +#define TreeView_GetItemPartRect(hwnd, hitem, rect, part) \ +{ \ + TVGETITEMPARTRECTINFO info; \ + info.hti = (hitem); \ + info.prc = (rect); \ + info.partID = (part); \ + SNDMSG((hwnd), TVM_GETITEMPARTRECT, 0, (LPARAM)&info); \ +} + + /* Listview control */ #define WC_LISTVIEWA "SysListView32"
1
0
0
0
Yuxuan Shui : shell32: Fix ShellExecute for non-filespec paths.
by Alexandre Julliard
31 May '24
31 May '24
Module: wine Branch: master Commit: 0bad544aab9e2c9ee93bbabac0386e02c58a39c0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0bad544aab9e2c9ee93bbabac0386e…
Author: Yuxuan Shui <yshui(a)codeweavers.com> Date: Mon May 20 09:51:07 2024 +0100 shell32: Fix ShellExecute for non-filespec paths. --- dlls/shell32/shlexec.c | 60 ++++++++++++++++++++++++++++++++++---------- dlls/shell32/tests/shlexec.c | 13 +++++++++- 2 files changed, 59 insertions(+), 14 deletions(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index f0cf27c5098..828c7168a34 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -49,6 +49,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(exec); typedef UINT_PTR (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, const SHELLEXECUTEINFOW *sei, LPSHELLEXECUTEINFOW sei_out); extern BOOL WINAPI PathResolveAW(void *path, const void **paths, DWORD flags); +extern BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich); static inline BOOL isSpace(WCHAR c) { @@ -627,24 +628,57 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb, return 33; } - if (lpPath && *lpPath) + GetCurrentDirectoryW(ARRAY_SIZE(curdir), curdir); + if (!PathIsFileSpecW(lpFile)) { - search_paths[0] = lpPath; - search_paths[1] = curdir; + BOOL found = FALSE; + if (lpPath && *lpPath) + { + TRACE("ASDF %s\n", debugstr_w(lpPath)); + PathCombineW(xlpFile, lpPath, lpFile); + if (PathFileExistsDefExtW(xlpFile, 0xbf)) + { + GetFullPathNameW(xlpFile, ARRAY_SIZE(xlpFile), xlpFile, NULL); + found = TRUE; + } + } + if (!found) + { + lstrcpyW(xlpFile, lpFile); + if (PathFileExistsDefExtW(xlpFile, 0xbf)) + { + GetFullPathNameW(xlpFile, ARRAY_SIZE(xlpFile), xlpFile, NULL); + found = TRUE; + } + } + if (found) + { + lpFile = xlpFile; + lstrcpyW(lpResult, xlpFile); + } + else + xlpFile[0] = '\0'; } else - search_paths[0] = curdir; - GetCurrentDirectoryW(ARRAY_SIZE(curdir), curdir); - lstrcpyW(xlpFile, lpFile); - if (PathResolveAW(xlpFile, (const void **)search_paths, PRF_TRYPROGRAMEXTENSIONS | PRF_VERIFYEXISTS)) { - TRACE("PathResolveAW returned non-zero\n"); - lpFile = xlpFile; - lstrcpyW(lpResult, xlpFile); - /* The file was found in lpPath or one of the directories in the system-wide search path */ + if (lpPath && *lpPath) + { + search_paths[0] = lpPath; + search_paths[1] = curdir; + } + else + search_paths[0] = curdir; + lstrcpyW(xlpFile, lpFile); + if (PathResolveAW(xlpFile, (const void **)search_paths, PRF_TRYPROGRAMEXTENSIONS | PRF_VERIFYEXISTS)) + { + TRACE("PathResolveAW returned non-zero\n"); + lpFile = xlpFile; + lstrcpyW(lpResult, xlpFile); + /* The file was found in lpPath or one of the directories in the system-wide search path */ + } + else + xlpFile[0] = '\0'; } - else - xlpFile[0] = '\0'; attribs = GetFileAttributesW(lpFile); if (attribs!=INVALID_FILE_ATTRIBUTES && (attribs&FILE_ATTRIBUTE_DIRECTORY)) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 0f537d829f4..bd32ece8705 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -2267,9 +2267,11 @@ static void test_exes(void) char filename[2 * MAX_PATH + 17]; char params[1024]; char curdir[MAX_PATH]; - char *basename = strrchr(argv0, '\\') + 1; + char relative_basename[MAX_PATH]; + char *basename = strrchr(argv0, '\\') + 1, *dirname = strdup(argv0); INT_PTR rc; + *strrchr(dirname, '\\') = '\0'; sprintf(params, "shlexec \"%s\" Exec", child_file); /* We need NOZONECHECKS on Win2003 to block a dialog */ @@ -2279,6 +2281,15 @@ static void test_exes(void) okChildInt("argcA", 4); okChildString("argvA3", "Exec"); + /* Check non-filespec paths */ + snprintf(relative_basename, ARRAY_SIZE(relative_basename), ".\\\\%s", basename); + rc=shell_execute_ex(SEE_MASK_NOZONECHECKS | SEE_MASK_FLAG_NO_UI, NULL, relative_basename, params, + dirname, NULL); + okShell(rc > 32, "returned %Iu\n", rc); + okChildInt("argcA", 4); + okChildString("argvA3", "Exec"); + free(dirname); + rc=shell_execute_ex(SEE_MASK_NOZONECHECKS | SEE_MASK_CLASSNAME | SEE_MASK_FLAG_NO_UI, NULL, argv0, params, NULL, ".exe"); okShell(rc > 32, "returned %Iu\n", rc);
1
0
0
0
← Newer
1
2
3
4
5
6
...
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