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
November 2023
----- 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
989 discussions
Start a n
N
ew thread
Henri Verbeet : vkd3d: Add support for the ID3D12Resource1 interface.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: vkd3d Branch: master Commit: 2252f012ea0ce989d8eb771ea7f33c2125ae8d9e URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/2252f012ea0ce989d8eb771ea7f33…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 7 11:57:10 2023 +0000 vkd3d: Add support for the ID3D12Resource1 interface. --- libs/vkd3d/device.c | 8 ++--- libs/vkd3d/resource.c | 87 ++++++++++++++++++++++++++-------------------- libs/vkd3d/vkd3d_private.h | 9 +++-- 3 files changed, 60 insertions(+), 44 deletions(-)
1
0
0
0
Zebediah Figura : mfplat/tests: Shut down the media source in test_create_from_file_handler_callback_Invoke().
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: wine Branch: master Commit: ee209a93cb786d120032eaa285729e28f64f5b11 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ee209a93cb786d120032eaa285729e…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Nov 8 14:13:23 2023 -0600 mfplat/tests: Shut down the media source in test_create_from_file_handler_callback_Invoke(). Break its reference count cycle so that we don't leak it. --- dlls/mfplat/tests/mfplat.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 5f9460655ec..4fcf5f19558 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -781,15 +781,25 @@ static HRESULT WINAPI test_create_from_file_handler_callback_Invoke(IMFAsyncCall hr = IMFSchemeHandler_EndCreateObject(handler, result, &obj_type, &object); ok(hr == S_OK, "Failed to create an object, hr %#lx.\n", hr); + todo_wine ok(obj_type == MF_OBJECT_BYTESTREAM, "Got object type %#x.\n", obj_type); - if (SUCCEEDED(hr)) + hr = IMFAsyncResult_GetObject(result, (IUnknown **)&object2); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); + + if (obj_type == MF_OBJECT_MEDIASOURCE) { - hr = IMFAsyncResult_GetObject(result, &object2); - ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); + IMFMediaSource *media_source; - IUnknown_Release(object); + hr = IUnknown_QueryInterface(object, &IID_IMFMediaSource, (void **)&media_source); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + hr = IMFMediaSource_Shutdown(media_source); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + IMFMediaSource_Release(media_source); } + IUnknown_Release(object); + SetEvent(callback->event); return S_OK;
1
0
0
0
Henri Verbeet : vkd3d-compiler: Introduce an option to specify the origin of fragment coordinates.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: vkd3d Branch: master Commit: 557b32a50465e3cb6ca01f64f3467e643a7d4803 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/557b32a50465e3cb6ca01f64f3467…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Nov 5 00:12:00 2023 +0100 vkd3d-compiler: Introduce an option to specify the origin of fragment coordinates. --- programs/vkd3d-compiler/main.c | 61 +++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 2d10baca..4409d250 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -40,6 +40,7 @@ enum OPTION_HELP = CHAR_MAX + 1, OPTION_BUFFER_UAV, OPTION_ENTRY, + OPTION_FRAGMENT_COORDINATE_ORIGIN, OPTION_MATRIX_STORAGE_ORDER, OPTION_OUTPUT, OPTION_PRINT_SOURCE_TYPES, @@ -189,6 +190,11 @@ static void print_usage(const char *program_name) " optionally prefixed by '+' or '-'. Valid flags are\n" " 'colour', 'indent', 'offsets', 'header', and 'raw-ids'.\n" " The 'indent' and 'header' flags are enabled by default.\n" + " --fragment-coordinate-origin=<origin>\n" + " Specify the origin of fragment coordinates for SPIR-V\n" + " targets. Valid values are 'upper-left' (default) and\n" + " 'lower-left'. The only value supported by Vulkan\n" + " environments is 'upper-left'.\n" " --matrix-storage-order=<order>\n" " Specify the default matrix storage order. Valid values\n" " are 'column' (default) and 'row'.\n" @@ -337,6 +343,24 @@ static bool parse_formatting(uint32_t *formatting, bool *colour, char *arg) return true; } +static bool parse_fragment_coordinate_origin(enum vkd3d_shader_compile_option_fragment_coordinate_origin *origin, + const char *arg) +{ + if (!strcmp(arg, "upper-left")) + { + *origin = VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT; + return true; + } + + if (!strcmp(arg, "lower-left")) + { + *origin = VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT; + return true; + } + + return false; +} + static bool parse_matrix_storage_order(enum vkd3d_shader_compile_option_pack_matrix_order *order, const char *arg) { if (!strcmp(arg, "column")) @@ -441,25 +465,27 @@ static bool validate_target_type( static bool parse_command_line(int argc, char **argv, struct options *options) { enum vkd3d_shader_compile_option_pack_matrix_order pack_matrix_order; + enum vkd3d_shader_compile_option_fragment_coordinate_origin origin; enum vkd3d_shader_compile_option_buffer_uav buffer_uav; unsigned int compat_options = 0; int option; static struct option long_options[] = { - {"help", no_argument, NULL, OPTION_HELP}, - {"buffer-uav", required_argument, NULL, OPTION_BUFFER_UAV}, - {"entry", required_argument, NULL, OPTION_ENTRY}, - {"matrix-storage-order", required_argument, NULL, OPTION_MATRIX_STORAGE_ORDER}, - {"output", required_argument, NULL, OPTION_OUTPUT}, - {"formatting", required_argument, NULL, OPTION_TEXT_FORMATTING}, - {"print-source-types", no_argument, NULL, OPTION_PRINT_SOURCE_TYPES}, - {"print-target-types", no_argument, NULL, OPTION_PRINT_TARGET_TYPES}, - {"profile", required_argument, NULL, OPTION_PROFILE}, - {"strip-debug", no_argument, NULL, OPTION_STRIP_DEBUG}, - {"version", no_argument, NULL, OPTION_VERSION}, - {"semantic-compat-map", no_argument, NULL, OPTION_SEMANTIC_COMPAT_MAP}, - {NULL, 0, NULL, 0}, + {"help", no_argument, NULL, OPTION_HELP}, + {"buffer-uav", required_argument, NULL, OPTION_BUFFER_UAV}, + {"entry", required_argument, NULL, OPTION_ENTRY}, + {"fragment-coordinate-origin", required_argument, NULL, OPTION_FRAGMENT_COORDINATE_ORIGIN}, + {"matrix-storage-order", required_argument, NULL, OPTION_MATRIX_STORAGE_ORDER}, + {"output", required_argument, NULL, OPTION_OUTPUT}, + {"formatting", required_argument, NULL, OPTION_TEXT_FORMATTING}, + {"print-source-types", no_argument, NULL, OPTION_PRINT_SOURCE_TYPES}, + {"print-target-types", no_argument, NULL, OPTION_PRINT_TARGET_TYPES}, + {"profile", required_argument, NULL, OPTION_PROFILE}, + {"strip-debug", no_argument, NULL, OPTION_STRIP_DEBUG}, + {"version", no_argument, NULL, OPTION_VERSION}, + {"semantic-compat-map", no_argument, NULL, OPTION_SEMANTIC_COMPAT_MAP}, + {NULL, 0, NULL, 0}, }; memset(options, 0, sizeof(*options)); @@ -501,6 +527,15 @@ static bool parse_command_line(int argc, char **argv, struct options *options) options->preprocess_only = true; break; + case OPTION_FRAGMENT_COORDINATE_ORIGIN: + if (!parse_fragment_coordinate_origin(&origin, optarg)) + { + fprintf(stderr, "Invalid fragment coordinate origin '%s' specified.\n", optarg); + return false; + } + add_compile_option(options, VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN, origin); + break; + case 'h': case OPTION_HELP: options->print_help = true;
1
0
0
0
Henri Verbeet : vkd3d-shader/spirv: Allow the origin of fragment coordinates to be specified.
by Alexandre Julliard
09 Nov '23
09 Nov '23
Module: vkd3d Branch: master Commit: e7eec3e023bf669fc9a632d4390db549a2de2718 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/e7eec3e023bf669fc9a632d4390db…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sat Oct 14 18:07:38 2023 +0200 vkd3d-shader/spirv: Allow the origin of fragment coordinates to be specified. We typically want to use lower-left in OpenGL environments when rendering to FBOs. --- include/vkd3d_shader.h | 25 +++++++++++++++++++++++++ libs/vkd3d-shader/spirv.c | 13 ++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 94f79c7c..1d6cbbf8 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -173,6 +173,21 @@ enum vkd3d_shader_compile_option_backward_compatibility VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY), }; +/** + * Determines the origin of fragment coordinates. + * + * \since 1.10 + */ +enum vkd3d_shader_compile_option_fragment_coordinate_origin +{ + /** Fragment coordinates originate from the upper-left. This is the + * default; it's also the only value supported by Vulkan environments. */ + VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000, + /** Fragment coordinates originate from the lower-left. This matches the + * traditional behaviour of OpenGL environments. */ + VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001, +}; + enum vkd3d_shader_compile_option_name { /** @@ -220,6 +235,16 @@ enum vkd3d_shader_compile_option_name * \since 1.10 */ VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY = 0x00000008, + /** + * This option specifies the origin of fragment coordinates for SPIR-V + * targets. + * + * \a value is a member of enum + * vkd3d_shader_compile_option_fragment_coordinate_origin. + * + * \since 1.10 + */ + VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN = 0x00000009, VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_NAME), }; diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 61d75757..c681b9f8 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2288,6 +2288,7 @@ struct spirv_compiler bool strip_debug; bool ssbo_uavs; bool uav_read_without_format; + SpvExecutionMode fragment_coordinate_origin; struct rb_tree symbol_table; uint32_t temp_id; @@ -2453,6 +2454,7 @@ static struct spirv_compiler *spirv_compiler_create(const struct vkd3d_shader_ve compiler->formatting = VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT | VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER; compiler->write_tess_geom_point_size = true; + compiler->fragment_coordinate_origin = SpvExecutionModeOriginUpperLeft; for (i = 0; i < compile_info->option_count; ++i) { @@ -2493,6 +2495,15 @@ static struct spirv_compiler *spirv_compiler_create(const struct vkd3d_shader_ve compiler->write_tess_geom_point_size = option->value; break; + case VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN: + if (option->value == VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT) + compiler->fragment_coordinate_origin = SpvExecutionModeOriginUpperLeft; + else if (option->value == VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT) + compiler->fragment_coordinate_origin = SpvExecutionModeOriginLowerLeft; + else + WARN("Ignoring unrecognised value %#x for option %#x.\n", option->value, option->name); + break; + default: WARN("Ignoring unrecognised option %#x with value %#x.\n", option->name, option->value); break; @@ -5358,7 +5369,7 @@ static void spirv_compiler_emit_initial_declarations(struct spirv_compiler *comp break; case VKD3D_SHADER_TYPE_PIXEL: vkd3d_spirv_set_execution_model(builder, SpvExecutionModelFragment); - spirv_compiler_emit_execution_mode(compiler, SpvExecutionModeOriginUpperLeft, NULL, 0); + spirv_compiler_emit_execution_mode(compiler, compiler->fragment_coordinate_origin, NULL, 0); break; case VKD3D_SHADER_TYPE_COMPUTE: vkd3d_spirv_set_execution_model(builder, SpvExecutionModelGLCompute);
1
0
0
0
Alex Henrie : wmvcore: Use CRT allocation functions.
by Alexandre Julliard
08 Nov '23
08 Nov '23
Module: wine Branch: master Commit: dfa0c9d28da8f94116b724ef84bd655af3563845 URL:
https://gitlab.winehq.org/wine/wine/-/commit/dfa0c9d28da8f94116b724ef84bd65…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Nov 2 22:21:57 2023 -0600 wmvcore: Use CRT allocation functions. --- dlls/wmvcore/wmvcore_main.c | 5 ++--- dlls/wmvcore/writer.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c index 016287b1b78..3b61fe13c15 100644 --- a/dlls/wmvcore/wmvcore_main.c +++ b/dlls/wmvcore/wmvcore_main.c @@ -27,7 +27,6 @@ #include "wmsdk.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); @@ -146,7 +145,7 @@ static ULONG WINAPI WMProfileManager_Release(IWMProfileManager2 *iface) TRACE("(%p) ref=%ld\n", This, ref); if(!ref) - heap_free(This); + free(This); return ref; } @@ -227,7 +226,7 @@ HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret) TRACE("(%p)\n", ret); - profile_mgr = heap_alloc(sizeof(*profile_mgr)); + profile_mgr = malloc(sizeof(*profile_mgr)); if(!profile_mgr) return E_OUTOFMEMORY; diff --git a/dlls/wmvcore/writer.c b/dlls/wmvcore/writer.c index f34e40f0e47..124696f2021 100644 --- a/dlls/wmvcore/writer.c +++ b/dlls/wmvcore/writer.c @@ -20,7 +20,6 @@ #include "wmsdkidl.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); @@ -82,7 +81,7 @@ static ULONG WINAPI WMWriter_Release(IWMWriter *iface) TRACE("(%p) ref=%ld\n", This, ref); if(!ref) - heap_free(This); + free(This); return ref; } @@ -359,7 +358,7 @@ HRESULT WINAPI WMCreateWriter(IUnknown *reserved, IWMWriter **writer) TRACE("(%p %p)\n", reserved, writer); - ret = heap_alloc(sizeof(*ret)); + ret = malloc(sizeof(*ret)); if(!ret) return E_OUTOFMEMORY;
1
0
0
0
Alex Henrie : devenum: Use CRT allocation functions.
by Alexandre Julliard
08 Nov '23
08 Nov '23
Module: wine Branch: master Commit: 726c5df58feb0e3e579b9eb5ec8bedbe2bc53fe2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/726c5df58feb0e3e579b9eb5ec8bed…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Nov 2 21:20:15 2023 -0600 devenum: Use CRT allocation functions. --- dlls/devenum/createdevenum.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c index 30bbf483b21..bc91b235804 100644 --- a/dlls/devenum/createdevenum.c +++ b/dlls/devenum/createdevenum.c @@ -29,7 +29,6 @@ #include "dsound.h" #include "wine/debug.h" -#include "wine/heap.h" #include "mmddk.h" #include "initguid.h" @@ -87,7 +86,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name, if (FAILED(hr)) return hr; - if (!(buffer = heap_alloc((wcslen(L"@device:cm:") + CHARS_IN_GUID + wcslen(name) + 1) * sizeof(WCHAR)))) + if (!(buffer = malloc((wcslen(L"@device:cm:") + CHARS_IN_GUID + wcslen(name) + 1) * sizeof(WCHAR)))) { IParseDisplayName_Release(parser); return E_OUTOFMEMORY; @@ -100,7 +99,7 @@ static HRESULT register_codec(const GUID *class, const WCHAR *name, IParseDisplayName_ParseDisplayName(parser, NULL, buffer, &eaten, &mon); IParseDisplayName_Release(parser); - heap_free(buffer); + free(buffer); IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&propbag); IMoniker_Release(mon); @@ -428,7 +427,7 @@ static void register_legacy_filters(void) len = 0; if (!RegQueryValueExW(classkey, NULL, NULL, &Type, NULL, &len)) { - WCHAR *friendlyname = heap_alloc(len); + WCHAR *friendlyname = malloc(len); if (!friendlyname) { RegCloseKey(classkey); @@ -439,7 +438,7 @@ static void register_legacy_filters(void) hr = register_codec(&CLSID_LegacyAmFilterCategory, wszFilterSubkeyName, &clsid, friendlyname, &prop_bag); - heap_free(friendlyname); + free(friendlyname); } else hr = register_codec(&CLSID_LegacyAmFilterCategory, wszFilterSubkeyName, @@ -482,7 +481,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons if (guid) { - WCHAR *name = heap_alloc(sizeof(defaultW) + wcslen(desc) * sizeof(WCHAR)); + WCHAR *name = malloc(sizeof(defaultW) + wcslen(desc) * sizeof(WCHAR)); if (!name) return FALSE; wcscpy(name, L"DirectSound: "); @@ -490,7 +489,7 @@ static BOOL CALLBACK register_dsound_devices(GUID *guid, const WCHAR *desc, cons hr = register_codec(&CLSID_AudioRendererCategory, name, &CLSID_DSoundRender, name, &prop_bag); - heap_free(name); + free(name); } else hr = register_codec(&CLSID_AudioRendererCategory, defaultW,
1
0
0
0
Ziqing Hui : winegstreamer: Implement wg_muxer_push_sample.
by Alexandre Julliard
08 Nov '23
08 Nov '23
Module: wine Branch: master Commit: d0153cf37f334ee35d79335d3a77d29c91c2cb85 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d0153cf37f334ee35d79335d3a77d2…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu Aug 17 11:02:16 2023 +0800 winegstreamer: Implement wg_muxer_push_sample. --- dlls/winegstreamer/wg_muxer.c | 105 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/wg_muxer.c b/dlls/winegstreamer/wg_muxer.c index 5d37489f994..7402ba91a58 100644 --- a/dlls/winegstreamer/wg_muxer.c +++ b/dlls/winegstreamer/wg_muxer.c @@ -59,6 +59,9 @@ struct wg_muxer GstPad *my_sink; GstCaps *my_sink_caps; + pthread_mutex_t mutex; + guint64 offset; + struct list streams; }; @@ -81,6 +84,19 @@ static struct wg_muxer *get_muxer(wg_muxer_t muxer) return (struct wg_muxer *)(ULONG_PTR)muxer; } +static struct wg_muxer_stream *muxer_get_stream_by_id(struct wg_muxer *muxer, DWORD id) +{ + struct wg_muxer_stream *stream; + + LIST_FOR_EACH_ENTRY(stream, &muxer->streams, struct wg_muxer_stream, entry) + { + if (stream->id == id) + return stream; + } + + return NULL; +} + static bool muxer_try_muxer_factory(struct wg_muxer *muxer, GstElementFactory *muxer_factory) { struct wg_muxer_stream *stream; @@ -146,6 +162,46 @@ static gboolean muxer_sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *qu } } +static gboolean muxer_sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event) +{ + struct wg_muxer *muxer = gst_pad_get_element_private(pad); + const GstSegment *segment; + + GST_DEBUG("pad %p, parent %p, event %p, muxer %p, type \"%s\".", + pad, parent, event, muxer, GST_EVENT_TYPE_NAME(event)); + + switch (event->type) + { + case GST_EVENT_SEGMENT: + pthread_mutex_lock(&muxer->mutex); + + gst_event_parse_segment(event, &segment); + if (segment->format != GST_FORMAT_BYTES) + { + pthread_mutex_unlock(&muxer->mutex); + GST_FIXME("Unhandled segment format \"%s\".", gst_format_get_name(segment->format)); + break; + } + muxer->offset = segment->start; + + pthread_mutex_unlock(&muxer->mutex); + break; + + default: + GST_WARNING("Ignoring \"%s\" event.", GST_EVENT_TYPE_NAME(event)); + break; + } + + gst_event_unref(event); + return TRUE; +} + +static GstFlowReturn muxer_sink_chain_cb(GstPad *pad, GstObject *parent, GstBuffer *buffer) +{ + GST_FIXME("Stub."); + return GST_FLOW_ERROR; +} + static void stream_free(struct wg_muxer_stream *stream) { if (stream->parser_src_caps) @@ -166,6 +222,8 @@ NTSTATUS wg_muxer_create(void *args) if (!(muxer = calloc(1, sizeof(*muxer)))) return STATUS_NO_MEMORY; list_init(&muxer->streams); + muxer->offset = GST_BUFFER_OFFSET_NONE; + pthread_mutex_init(&muxer->mutex, NULL); if (!(muxer->container = gst_bin_new("wg_muxer"))) goto out; @@ -182,6 +240,8 @@ NTSTATUS wg_muxer_create(void *args) goto out; gst_pad_set_element_private(muxer->my_sink, muxer); gst_pad_set_query_function(muxer->my_sink, muxer_sink_query_cb); + gst_pad_set_event_function(muxer->my_sink, muxer_sink_event_cb); + gst_pad_set_chain_function(muxer->my_sink, muxer_sink_chain_cb); gst_object_unref(template); @@ -199,6 +259,7 @@ out: gst_caps_unref(muxer->my_sink_caps); if (muxer->container) gst_object_unref(muxer->container); + pthread_mutex_destroy(&muxer->mutex); free(muxer); return status; @@ -214,10 +275,14 @@ NTSTATUS wg_muxer_destroy(void *args) list_remove(&stream->entry); stream_free(stream); } + gst_object_unref(muxer->my_sink); gst_caps_unref(muxer->my_sink_caps); gst_element_set_state(muxer->container, GST_STATE_NULL); gst_object_unref(muxer->container); + + pthread_mutex_destroy(&muxer->mutex); + free(muxer); return S_OK; @@ -346,5 +411,43 @@ NTSTATUS wg_muxer_start(void *args) NTSTATUS wg_muxer_push_sample(void *args) { - return STATUS_NOT_IMPLEMENTED; + struct wg_muxer_push_sample_params *params = args; + struct wg_muxer *muxer = get_muxer(params->muxer); + struct wg_sample *sample = params->sample; + struct wg_muxer_stream *stream; + GstFlowReturn ret; + GstBuffer *buffer; + + if (!(stream = muxer_get_stream_by_id(muxer, params->stream_id))) + return STATUS_NOT_FOUND; + + /* Create sample data buffer. */ + if (!(buffer = gst_buffer_new_and_alloc(sample->size)) + || !gst_buffer_fill(buffer, 0, wg_sample_data(sample), sample->size)) + { + GST_ERROR("Failed to allocate input buffer."); + return STATUS_NO_MEMORY; + } + + GST_INFO("Copied %u bytes from sample %p to buffer %p.", sample->size, sample, buffer); + + /* Set sample properties. */ + if (sample->flags & WG_SAMPLE_FLAG_HAS_PTS) + GST_BUFFER_PTS(buffer) = sample->pts * 100; + if (sample->flags & WG_SAMPLE_FLAG_HAS_DURATION) + GST_BUFFER_DURATION(buffer) = sample->duration * 100; + if (!(sample->flags & WG_SAMPLE_FLAG_SYNC_POINT)) + GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_DELTA_UNIT); + if (sample->flags & WG_SAMPLE_FLAG_DISCONTINUITY) + GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_DISCONT); + + /* Push sample data buffer to stream src pad. */ + if ((ret = gst_pad_push(stream->my_src, buffer)) < 0) + { + GST_ERROR("Failed to push buffer %p to pad %s, reason %s.", + buffer, gst_pad_get_name(stream->my_src), gst_flow_get_name(ret)); + return STATUS_UNSUCCESSFUL; + } + + return STATUS_SUCCESS; }
1
0
0
0
Ziqing Hui : winegstreamer: Implement ProcessSample for media sink.
by Alexandre Julliard
08 Nov '23
08 Nov '23
Module: wine Branch: master Commit: 37b2548399c393b2c0d7b8fa74971359c5a9f66c URL:
https://gitlab.winehq.org/wine/wine/-/commit/37b2548399c393b2c0d7b8fa749713…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Aug 18 10:03:45 2023 +0800 winegstreamer: Implement ProcessSample for media sink. --- dlls/winegstreamer/gst_private.h | 1 + dlls/winegstreamer/main.c | 21 ++++++++++ dlls/winegstreamer/media_sink.c | 88 ++++++++++++++++++++++++++++++++++++++- dlls/winegstreamer/unix_private.h | 1 + dlls/winegstreamer/unixlib.h | 8 ++++ dlls/winegstreamer/wg_muxer.c | 5 +++ dlls/winegstreamer/wg_parser.c | 19 +++++++++ 7 files changed, 141 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h index 22d92cfeef7..8712980092b 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -114,6 +114,7 @@ HRESULT wg_muxer_create(const char *format, wg_muxer_t *muxer); void wg_muxer_destroy(wg_muxer_t muxer); HRESULT wg_muxer_add_stream(wg_muxer_t muxer, UINT32 stream_id, const struct wg_format *format); HRESULT wg_muxer_start(wg_muxer_t muxer); +HRESULT wg_muxer_push_sample(wg_muxer_t muxer, struct wg_sample *sample, UINT32 stream_id); unsigned int wg_format_get_bytes_for_uncompressed(wg_video_format format, unsigned int width, unsigned int height); unsigned int wg_format_get_max_size(const struct wg_format *format); diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 58ad8c6f3d7..3eb82bdccf5 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -523,6 +523,27 @@ HRESULT wg_muxer_start(wg_muxer_t muxer) return S_OK; } +HRESULT wg_muxer_push_sample(wg_muxer_t muxer, struct wg_sample *sample, UINT32 steam_id) +{ + struct wg_muxer_push_sample_params params = + { + .muxer = muxer, + .sample = sample, + .stream_id = steam_id, + }; + NTSTATUS status; + + TRACE("muxer %#I64x, sample %p.\n", muxer, sample); + + if ((status = WINE_UNIX_CALL(unix_wg_muxer_push_sample, ¶ms))) + { + WARN("Failed to push sample, status %#lx.\n", status); + return HRESULT_FROM_NT(status); + } + + return S_OK; +} + #define ALIGN(n, alignment) (((n) + (alignment) - 1) & ~((alignment) - 1)) unsigned int wg_format_get_stride(const struct wg_format *format) diff --git a/dlls/winegstreamer/media_sink.c b/dlls/winegstreamer/media_sink.c index 489ede1d26a..d9c15291b61 100644 --- a/dlls/winegstreamer/media_sink.c +++ b/dlls/winegstreamer/media_sink.c @@ -31,6 +31,7 @@ enum async_op ASYNC_START, ASYNC_STOP, ASYNC_PAUSE, + ASYNC_PROCESS, }; struct async_command @@ -39,6 +40,15 @@ struct async_command LONG refcount; enum async_op op; + + union + { + struct + { + IMFSample *sample; + UINT32 stream_id; + } process; + } u; }; struct stream_sink @@ -142,7 +152,11 @@ static ULONG WINAPI async_command_Release(IUnknown *iface) ULONG refcount = InterlockedDecrement(&command->refcount); if (!refcount) + { + if (command->op == ASYNC_PROCESS && command->u.process.sample) + IMFSample_Release(command->u.process.sample); free(command); + } return refcount; } @@ -301,9 +315,41 @@ static HRESULT WINAPI stream_sink_GetMediaTypeHandler(IMFStreamSink *iface, IMFM static HRESULT WINAPI stream_sink_ProcessSample(IMFStreamSink *iface, IMFSample *sample) { - FIXME("iface %p, sample %p stub!\n", iface, sample); + struct stream_sink *stream_sink = impl_from_IMFStreamSink(iface); + struct media_sink *media_sink = impl_from_IMFFinalizableMediaSink(stream_sink->media_sink); + struct async_command *command; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, sample %p.\n", iface, sample); + + EnterCriticalSection(&media_sink->cs); + + if (media_sink->state == STATE_SHUTDOWN) + { + LeaveCriticalSection(&media_sink->cs); + return MF_E_SHUTDOWN; + } + + if (media_sink->state != STATE_STARTED && media_sink->state != STATE_PAUSED) + { + LeaveCriticalSection(&media_sink->cs); + return MF_E_INVALIDREQUEST; + } + + if (FAILED(hr = (async_command_create(ASYNC_PROCESS, &command)))) + { + LeaveCriticalSection(&media_sink->cs); + return hr; + } + IMFSample_AddRef((command->u.process.sample = sample)); + command->u.process.stream_id = stream_sink->id; + + if (FAILED(hr = MFPutWorkItem(MFASYNC_CALLBACK_QUEUE_STANDARD, &media_sink->async_callback, &command->IUnknown_iface))) + IUnknown_Release(&command->IUnknown_iface); + + LeaveCriticalSection(&media_sink->cs); + + return hr; } static HRESULT WINAPI stream_sink_PlaceMarker(IMFStreamSink *iface, MFSTREAMSINK_MARKER_TYPE marker_type, @@ -521,6 +567,40 @@ static HRESULT media_sink_pause(struct media_sink *media_sink) return media_sink_queue_stream_event(media_sink, MEStreamSinkPaused); } +static HRESULT media_sink_process(struct media_sink *media_sink, IMFSample *sample, UINT32 stream_id) +{ + wg_muxer_t muxer = media_sink->muxer; + struct wg_sample *wg_sample; + LONGLONG time, duration; + UINT32 value; + HRESULT hr; + + TRACE("media_sink %p, sample %p, stream_id %u.\n", media_sink, sample, stream_id); + + if (FAILED(hr = wg_sample_create_mf(sample, &wg_sample))) + return hr; + + if (SUCCEEDED(IMFSample_GetSampleTime(sample, &time))) + { + wg_sample->flags |= WG_SAMPLE_FLAG_HAS_PTS; + wg_sample->pts = time; + } + if (SUCCEEDED(IMFSample_GetSampleDuration(sample, &duration))) + { + wg_sample->flags |= WG_SAMPLE_FLAG_HAS_DURATION; + wg_sample->duration = duration; + } + if (SUCCEEDED(IMFSample_GetUINT32(sample, &MFSampleExtension_CleanPoint, &value)) && value) + wg_sample->flags |= WG_SAMPLE_FLAG_SYNC_POINT; + if (SUCCEEDED(IMFSample_GetUINT32(sample, &MFSampleExtension_Discontinuity, &value)) && value) + wg_sample->flags |= WG_SAMPLE_FLAG_DISCONTINUITY; + + hr = wg_muxer_push_sample(muxer, wg_sample, stream_id); + wg_sample_release(wg_sample); + + return hr; +} + static HRESULT WINAPI media_sink_QueryInterface(IMFFinalizableMediaSink *iface, REFIID riid, void **obj) { struct media_sink *media_sink = impl_from_IMFFinalizableMediaSink(iface); @@ -1022,6 +1102,10 @@ static HRESULT WINAPI media_sink_callback_Invoke(IMFAsyncCallback *iface, IMFAsy case ASYNC_PAUSE: hr = media_sink_pause(media_sink); break; + case ASYNC_PROCESS: + if (FAILED(hr = media_sink_process(media_sink, command->u.process.sample, command->u.process.stream_id))) + WARN("Failed to process sample, hr %#lx.\n", hr); + break; default: WARN("Unsupported op %u.\n", command->op); break; diff --git a/dlls/winegstreamer/unix_private.h b/dlls/winegstreamer/unix_private.h index ad1817d8c2d..f639b03bcce 100644 --- a/dlls/winegstreamer/unix_private.h +++ b/dlls/winegstreamer/unix_private.h @@ -69,6 +69,7 @@ extern NTSTATUS wg_muxer_create(void *args) DECLSPEC_HIDDEN; extern NTSTATUS wg_muxer_destroy(void *args) DECLSPEC_HIDDEN; extern NTSTATUS wg_muxer_add_stream(void *args) DECLSPEC_HIDDEN; extern NTSTATUS wg_muxer_start(void *args) DECLSPEC_HIDDEN; +extern NTSTATUS wg_muxer_push_sample(void *args) DECLSPEC_HIDDEN; /* wg_allocator.c */ diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 70bbe89208f..6c0c61f76bb 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -385,6 +385,13 @@ struct wg_muxer_add_stream_params const struct wg_format *format; }; +struct wg_muxer_push_sample_params +{ + wg_muxer_t muxer; + struct wg_sample *sample; + UINT32 stream_id; +}; + enum unix_funcs { unix_wg_init_gstreamer, @@ -429,6 +436,7 @@ enum unix_funcs unix_wg_muxer_destroy, unix_wg_muxer_add_stream, unix_wg_muxer_start, + unix_wg_muxer_push_sample, unix_wg_funcs_count, }; diff --git a/dlls/winegstreamer/wg_muxer.c b/dlls/winegstreamer/wg_muxer.c index aa453ad9837..5d37489f994 100644 --- a/dlls/winegstreamer/wg_muxer.c +++ b/dlls/winegstreamer/wg_muxer.c @@ -343,3 +343,8 @@ NTSTATUS wg_muxer_start(void *args) return STATUS_SUCCESS; } + +NTSTATUS wg_muxer_push_sample(void *args) +{ + return STATUS_NOT_IMPLEMENTED; +} diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 065b4216dd4..5a526b15712 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -1923,6 +1923,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] = X(wg_muxer_destroy), X(wg_muxer_add_stream), X(wg_muxer_start), + X(wg_muxer_push_sample), }; C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == unix_wg_funcs_count); @@ -2166,6 +2167,23 @@ NTSTATUS wow64_wg_muxer_add_stream(void *args) return wg_muxer_add_stream(¶ms); } +NTSTATUS wow64_wg_muxer_push_sample(void *args) +{ + struct + { + wg_muxer_t muxer; + PTR32 sample; + UINT32 stream_id; + } *params32 = args; + struct wg_muxer_push_sample_params params = + { + .muxer = params32->muxer, + .sample = ULongToPtr(params32->sample), + .stream_id = params32->stream_id, + }; + return wg_muxer_push_sample(¶ms); +} + const unixlib_entry_t __wine_unix_call_wow64_funcs[] = { #define X64(name) [unix_ ## name] = wow64_ ## name @@ -2211,6 +2229,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = X(wg_muxer_destroy), X64(wg_muxer_add_stream), X(wg_muxer_start), + X64(wg_muxer_push_sample), }; C_ASSERT(ARRAYSIZE(__wine_unix_call_wow64_funcs) == unix_wg_funcs_count);
1
0
0
0
Dmitry Timoshkov : uxtheme: If the application class is already set then OpenThemeData() should fail.
by Alexandre Julliard
08 Nov '23
08 Nov '23
Module: wine Branch: master Commit: dfffe7b49c3b60dd9d96c2f45a88d59d0f7d9587 URL:
https://gitlab.winehq.org/wine/wine/-/commit/dfffe7b49c3b60dd9d96c2f45a88d5…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Nov 2 14:21:36 2023 +0300 uxtheme: If the application class is already set then OpenThemeData() should fail. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/uxtheme/msstyles.c | 18 ++++++++++++------ dlls/uxtheme/tests/system.c | 2 -- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index 4c67e3b15c5..4fc9a344661 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -1076,9 +1076,12 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U parse_app_class_name(buf, szAppName, szClassName); if (szAppName[0]) - cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName); - else - cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); + { + /* If the application class is already set then fail */ + if (pszAppName) return NULL; + pszAppName = szAppName; + } + cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); /* Fall back to default class if the specified subclass is not found */ if (!cls) cls = MSSTYLES_FindClass(tfActiveTheme, NULL, szClassName); @@ -1088,9 +1091,12 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U if(!cls && *start) { parse_app_class_name(start, szAppName, szClassName); if (szAppName[0]) - cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName); - else - cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); + { + /* If the application class is already set then fail */ + if (pszAppName) return NULL; + pszAppName = szAppName; + } + cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); /* Fall back to default class if the specified subclass is not found */ if (!cls) cls = MSSTYLES_FindClass(tfActiveTheme, NULL, szClassName); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 6c7e87c1040..c79a6c85a35 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -562,9 +562,7 @@ static void test_OpenThemeData(void) ok(hRes == S_OK, "Got unexpected hr %#lx.\n", hRes); SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, L"explorer::treeview"); - todo_wine ok(!hTheme, "OpenThemeData() should fail\n"); - todo_wine ok(GetLastError() == E_PROP_ID_UNSUPPORTED, "Got unexpected %#lx.\n", GetLastError()); SetWindowTheme(hWnd, NULL, NULL);
1
0
0
0
Dmitry Timoshkov : uxtheme: Move fall back to default class to MSSTYLES_OpenThemeClass().
by Alexandre Julliard
08 Nov '23
08 Nov '23
Module: wine Branch: master Commit: 87f1a380190aeb69e486c743f485f4a286592459 URL:
https://gitlab.winehq.org/wine/wine/-/commit/87f1a380190aeb69e486c743f485f4…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Nov 2 14:19:06 2023 +0300 uxtheme: Move fall back to default class to MSSTYLES_OpenThemeClass(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/uxtheme/msstyles.c | 7 +++++++ dlls/uxtheme/system.c | 4 ---- dlls/uxtheme/tests/system.c | 2 -- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index a9b46f8ef22..4c67e3b15c5 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -1079,6 +1079,10 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName); else cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); + + /* Fall back to default class if the specified subclass is not found */ + if (!cls) cls = MSSTYLES_FindClass(tfActiveTheme, NULL, szClassName); + if(cls) break; } if(!cls && *start) { @@ -1087,6 +1091,9 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName); else cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); + + /* Fall back to default class if the specified subclass is not found */ + if (!cls) cls = MSSTYLES_FindClass(tfActiveTheme, NULL, szClassName); } if(cls) { TRACE("Opened app %s, class %s from list %s\n", debugstr_w(cls->szAppName), debugstr_w(cls->szClassName), debugstr_w(pszClassList)); diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 2c041356930..83cbaea5dfa 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -641,10 +641,6 @@ static HTHEME open_theme_data(HWND hwnd, LPCWSTR pszClassList, DWORD flags, UINT if (pszUseClassList) hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList, dpi); - - /* Fall back to default class if the specified subclass is not found */ - if (!hTheme) - hTheme = MSSTYLES_OpenThemeClass(NULL, pszUseClassList, dpi); } if(IsWindow(hwnd)) SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index de9419a032a..6c7e87c1040 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -583,9 +583,7 @@ static void test_OpenThemeData(void) SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, L"deadbeef::treeview;dead::beef"); - todo_wine ok(hTheme != NULL, "OpenThemeData() failed\n"); - todo_wine ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08lx\n", GetLastError()); CloseThemeData(hTheme);
1
0
0
0
← Newer
1
...
64
65
66
67
68
69
70
...
99
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
Results per page:
10
25
50
100
200