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
February 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1495 discussions
Start a n
N
ew thread
Jactry Zeng : gdi32: Fix a typo in unix_face_create().
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 89926751ff94d7640a252887e1cf799f5d3c4b2f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=89926751ff94d7640a252887…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Mon Jul 12 20:55:32 2021 +0800 gdi32: Fix a typo in unix_face_create(). This also fixes test failures in test_lang_names() when on Japanese system. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51382
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit aee7d560ae1834cb1a66c9057a230c6d56d9a943) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/gdi32/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 4f5d4725876..bbfe72cc769 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1243,7 +1243,7 @@ static struct unix_face *unix_face_create( const char *unix_name, void *data_ptr This->style_name = decode_opentype_name( &style_name.face_name ); memset( &full_name, 0, sizeof(full_name) ); - style_name.primary_langid = primary_langid; + full_name.primary_langid = primary_langid; opentype_enum_full_names( tt_name_v0, search_face_name_callback, &full_name ); This->full_name = decode_opentype_name( &full_name.face_name );
1
0
0
0
Zhiyi Zhang : uxtheme: Send WM_THEMECHANGED instead of posting it in SetWindowTheme().
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 46390286f0002bc47af22d4cb1dfa79f3a3e24c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=46390286f0002bc47af22d4c…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Jul 2 11:36:59 2021 +0800 uxtheme: Send WM_THEMECHANGED instead of posting it in SetWindowTheme(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51348
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit fe257dde58f03fe1fc9705caf24edbe16df7a1cd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/uxtheme/system.c | 2 +- dlls/uxtheme/tests/system.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index aaef03f0205..f8cc876b0c9 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -685,7 +685,7 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName, if(SUCCEEDED(hr)) hr = UXTHEME_SetWindowProperty(hwnd, atSubIdList, pszSubIdList); if(SUCCEEDED(hr)) - UXTHEME_broadcast_msg (hwnd, WM_THEMECHANGED); + SendMessageW(hwnd, WM_THEMECHANGED, 0, 0); return hr; } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index e008319e82a..f4719caad89 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -237,8 +237,8 @@ todo_wine } DispatchMessageA(&msg); } - ok_sequence(sequences, PARENT_SEQ_INDEX, SetWindowThemeSeq, "SetWindowTheme parent", TRUE); - ok_sequence(sequences, CHILD_SEQ_INDEX, EmptySeq, "SetWindowTheme child", TRUE); + ok_sequence(sequences, PARENT_SEQ_INDEX, SetWindowThemeSeq, "SetWindowTheme parent", FALSE); + ok_sequence(sequences, CHILD_SEQ_INDEX, EmptySeq, "SetWindowTheme child", FALSE); DestroyWindow(hWnd); UnregisterClassA("TestSetWindowThemeParentClass", GetModuleHandleA(0)); UnregisterClassA("TestSetWindowThemeChildClass", GetModuleHandleA(0));
1
0
0
0
Zhiyi Zhang : uxtheme/tests: Test that SetWindowTheme() should send WM_THEMECHANGED instead of posting it.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 6b501df752d9817771e6ef7ab5f3ab9207953b42 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b501df752d9817771e6ef7a…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Jul 2 11:36:49 2021 +0800 uxtheme/tests: Test that SetWindowTheme() should send WM_THEMECHANGED instead of posting it. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 064dad234295c2f5a2b95017dc280cac06afd614) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/uxtheme/tests/msg.h | 409 ++++++++++++++++++++++++++++++++++++++++++++ dlls/uxtheme/tests/system.c | 138 ++++++++++++++- 2 files changed, 545 insertions(+), 2 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6b501df752d9817771e6…
1
0
0
0
Henri Verbeet : dxgi: Implement d3d11_swapchain_GetLastPresentCount().
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: b96d75db4dfe70944d65a5c6a2b040382f099226 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b96d75db4dfe70944d65a5c6…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 1 16:56:31 2021 +0200 dxgi: Implement d3d11_swapchain_GetLastPresentCount(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 6f674ef6f137afe719f5cf049c60f4303bee205e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dxgi/dxgi_private.h | 1 + dlls/dxgi/swapchain.c | 14 +++++++++++--- dlls/dxgi/tests/dxgi.c | 20 +++++++++++--------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index acba3544e39..82272ff165a 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -182,6 +182,7 @@ struct d3d11_swapchain IDXGIFactory *factory; IDXGIOutput *target; + LONG present_count; }; HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 0f335a71cb7..b5a9c15a091 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -328,6 +328,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDevice(IDXGISwapChain1 *ifac static HRESULT d3d11_swapchain_present(struct d3d11_swapchain *swapchain, unsigned int sync_interval, unsigned int flags) { + HRESULT hr; + if (sync_interval > 4) { WARN("Invalid sync interval %u.\n", sync_interval); @@ -345,7 +347,9 @@ static HRESULT d3d11_swapchain_present(struct d3d11_swapchain *swapchain, return S_OK; } - return wined3d_swapchain_present(swapchain->wined3d_swapchain, NULL, NULL, NULL, sync_interval, 0); + if (SUCCEEDED(hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, NULL, NULL, NULL, sync_interval, 0))) + InterlockedIncrement(&swapchain->present_count); + return hr; } static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_Present(IDXGISwapChain1 *iface, UINT sync_interval, UINT flags) @@ -599,9 +603,13 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFrameStatistics(IDXGISwapCha static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetLastPresentCount(IDXGISwapChain1 *iface, UINT *last_present_count) { - FIXME("iface %p, last_present_count %p stub!\n", iface, last_present_count); + struct d3d11_swapchain *swapchain = d3d11_swapchain_from_IDXGISwapChain1(iface); - return E_NOTIMPL; + TRACE("iface %p, last_present_count %p.\n", iface, last_present_count); + + *last_present_count = swapchain->present_count; + + return S_OK; } /* IDXGISwapChain1 methods */ diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 8ee61fd800d..238bc014c18 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -7368,28 +7368,29 @@ static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12) present_count = ~0u; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - todo_wine ok(!present_count, "Got unexpected present count %u.\n", present_count); + todo_wine_if(is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) ok(!present_count, "Got unexpected present count %u.\n", present_count); hr = IDXGISwapChain_Present(swapchain, 0, 0); ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); expected = present_count + 1; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - todo_wine ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + todo_wine_if(is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) + ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); hr = IDXGISwapChain_Present(swapchain, 10, 0); ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); expected = present_count; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); hr = IDXGISwapChain_Present(swapchain, 0, DXGI_PRESENT_TEST); ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); expected = present_count; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); ShowWindow(window, SW_MINIMIZE); @@ -7397,7 +7398,7 @@ static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12) ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Got unexpected hr %#x.\n", hr); expected = present_count + !!is_d3d12; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); todo_wine_if(is_d3d12) ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); @@ -7406,8 +7407,9 @@ static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); expected = present_count + 1; hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - todo_wine ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + todo_wine_if(is_d3d12) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) + ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); IDXGISwapChain_Release(swapchain); DestroyWindow(window);
1
0
0
0
Henri Verbeet : dxgi/tests: Add a test for swapchain present counts.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: f8d613fdc540a38c1d4cb3ffcbc0ef5b8f2b114a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f8d613fdc540a38c1d4cb3ff…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 1 16:56:30 2021 +0200 dxgi/tests: Add a test for swapchain present counts. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 7eadbae52c9d287524acbe61121939d536a4026a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/dxgi/tests/dxgi.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 53d768d1a36..8ee61fd800d 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -908,6 +908,38 @@ static IDXGIAdapter *get_adapter_(unsigned int line, IUnknown *device, BOOL is_d return adapter; } +#define create_swapchain(a, b, c) create_swapchain_(__LINE__, a, b, c) +static IDXGISwapChain *create_swapchain_(unsigned int line, IUnknown *device, BOOL is_d3d12, HWND window) +{ + DXGI_SWAP_CHAIN_DESC desc; + IDXGISwapChain *swapchain; + IDXGIFactory *factory; + HRESULT hr; + + desc.BufferDesc.Width = 640; + desc.BufferDesc.Height = 480; + desc.BufferDesc.RefreshRate.Numerator = 60; + desc.BufferDesc.RefreshRate.Denominator = 1; + desc.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; + desc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; + desc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + desc.BufferCount = is_d3d12 ? 2 : 1; + desc.OutputWindow = window; + desc.Windowed = TRUE; + desc.SwapEffect = is_d3d12 ? DXGI_SWAP_EFFECT_FLIP_DISCARD : DXGI_SWAP_EFFECT_DISCARD; + desc.Flags = 0; + + get_factory(device, is_d3d12, &factory); + hr = IDXGIFactory_CreateSwapChain(factory, device, &desc, &swapchain); + ok_(__FILE__, line)(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); + IDXGIFactory_Release(factory); + + return swapchain; +} + static void test_adapter_desc(void) { DXGI_ADAPTER_DESC1 desc1; @@ -7324,6 +7356,63 @@ done: heap_free(original_modes); } +static void test_swapchain_present_count(IUnknown *device, BOOL is_d3d12) +{ + UINT present_count, expected; + IDXGISwapChain *swapchain; + HWND window; + HRESULT hr; + + window = create_window(); + swapchain = create_swapchain(device, is_d3d12, window); + + present_count = ~0u; + hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(!present_count, "Got unexpected present count %u.\n", present_count); + + hr = IDXGISwapChain_Present(swapchain, 0, 0); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + expected = present_count + 1; + hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + + hr = IDXGISwapChain_Present(swapchain, 10, 0); + ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr); + expected = present_count; + hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + + hr = IDXGISwapChain_Present(swapchain, 0, DXGI_PRESENT_TEST); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + expected = present_count; + hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + + ShowWindow(window, SW_MINIMIZE); + hr = IDXGISwapChain_Present(swapchain, 0, 0); + ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Got unexpected hr %#x.\n", hr); + expected = present_count + !!is_d3d12; + hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine_if(is_d3d12) + ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + + ShowWindow(window, SW_NORMAL); + hr = IDXGISwapChain_Present(swapchain, 0, 0); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + expected = present_count + 1; + hr = IDXGISwapChain_GetLastPresentCount(swapchain, &present_count); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + todo_wine ok(present_count == expected, "Got unexpected present count %u, expected %u.\n", present_count, expected); + + IDXGISwapChain_Release(swapchain); + DestroyWindow(window); +} + static void run_on_d3d10(void (*test_func)(IUnknown *device, BOOL is_d3d12)) { IDXGIDevice *device; @@ -7441,6 +7530,7 @@ START_TEST(dxgi) run_on_d3d10(test_window_association); run_on_d3d10(test_default_fullscreen_target_output); run_on_d3d10(test_mode_change); + run_on_d3d10(test_swapchain_present_count); if (!(d3d12_module = LoadLibraryA("d3d12.dll"))) { @@ -7471,6 +7561,7 @@ START_TEST(dxgi) run_on_d3d12(test_window_association); run_on_d3d12(test_default_fullscreen_target_output); run_on_d3d12(test_mode_change); + run_on_d3d12(test_swapchain_present_count); FreeLibrary(d3d12_module); }
1
0
0
0
Francois Gouget : ntdll: Fix the spelling of a comment.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 4b3ca9abee7fd52d418811bfe4f9fa792f675ac9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4b3ca9abee7fd52d418811bf…
Author: Francois Gouget <fgouget(a)free.fr> Date: Fri Aug 27 12:57:46 2021 +0200 ntdll: Fix the spelling of a comment. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 167c7a524fd0ebc8c3ef3afd1af463dbf2b374ce) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index af52e0e2833..e452c48df33 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -133,7 +133,7 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name ) * is_valid_directory * * Helper for RtlDosPathNameToNtPathName_U_WithStatus. - * Test if the path is an exisiting directory. + * Test if the path is an existing directory. */ static BOOL is_valid_directory(LPCWSTR path) {
1
0
0
0
Akihiro Sagawa : ntdll: Fix null pointer dereference in RtlDosPathNameToNtPathName_U_WithStatus.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: d3ffdb1740beb4efc66c0ce94b69be99ceb3daa5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d3ffdb1740beb4efc66c0ce9…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri Jun 25 18:47:00 2021 +0900 ntdll: Fix null pointer dereference in RtlDosPathNameToNtPathName_U_WithStatus. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c94ac2e0619ab31bc3138f17786e7cac00a95bcd) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index 9cb4ba7d49b..af52e0e2833 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -231,7 +231,7 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U goto out; } - if (*file_part) *file_part = NULL; + if (file_part) *file_part = NULL; sz = LOWORD(dosdev);
1
0
0
0
Akihiro Sagawa : ntdll: Validate directory path when the path name ends with a dos device name.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: a917d758b37cf7ba73e446e96b01c5976aa27d7b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a917d758b37cf7ba73e446e9…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sat Jun 19 18:25:35 2021 +0900 ntdll: Validate directory path when the path name ends with a dos device name. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51291
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0acd98f135b246176f33896bdc13ee6cadc3339e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/path.c | 91 ++++++++++++++++++++++++++++++++++++++++++------- dlls/ntdll/tests/path.c | 2 -- 2 files changed, 78 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index 86760f178e1..9cb4ba7d49b 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -129,6 +129,40 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name ) return 0; } +/****************************************************************** + * is_valid_directory + * + * Helper for RtlDosPathNameToNtPathName_U_WithStatus. + * Test if the path is an exisiting directory. + */ +static BOOL is_valid_directory(LPCWSTR path) +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING ntpath; + IO_STATUS_BLOCK io; + HANDLE handle; + NTSTATUS nts; + + if (!RtlDosPathNameToNtPathName_U(path, &ntpath, NULL, NULL)) + return FALSE; + + attr.Length = sizeof(attr); + attr.RootDirectory = 0; + attr.Attributes = OBJ_CASE_INSENSITIVE; + attr.ObjectName = &ntpath; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + + nts = NtOpenFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &io, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + RtlFreeUnicodeString(&ntpath); + if (nts != STATUS_SUCCESS) + return FALSE; + NtClose(handle); + return TRUE; +} + /************************************************************************** * RtlDosPathNameToNtPathName_U_WithStatus [NTDLL.@] * @@ -146,9 +180,10 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U { static const WCHAR global_prefix[] = {'\\','\\','?','\\'}; static const WCHAR global_prefix2[] = {'\\','?','?','\\'}; - ULONG sz, offset; + NTSTATUS nts = STATUS_SUCCESS; + ULONG sz, offset, dosdev; WCHAR local[MAX_PATH]; - LPWSTR ptr; + LPWSTR ptr = local; TRACE("(%s,%p,%p,%p)\n", debugstr_w(dos_path), ntpath, file_part, cd); @@ -178,28 +213,57 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U return STATUS_SUCCESS; } - ptr = local; - sz = RtlGetFullPathName_U(dos_path, sizeof(local), ptr, file_part); - if (sz == 0) return STATUS_OBJECT_NAME_INVALID; + dosdev = RtlIsDosDeviceName_U(dos_path); + if ((offset = HIWORD(dosdev))) + { + sz = offset + sizeof(WCHAR); + + if (sz > sizeof(local) && + (!(ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz)))) + return STATUS_NO_MEMORY; + + memcpy(ptr, dos_path, offset); + ptr[offset/sizeof(WCHAR)] = '\0'; + + if (!is_valid_directory(ptr)) + { + nts = STATUS_OBJECT_NAME_INVALID; + goto out; + } + + if (*file_part) *file_part = NULL; - if (sz > sizeof(local)) + sz = LOWORD(dosdev); + + wcscpy(ptr, L"\\\\.\\"); + memcpy(ptr + 4, dos_path + offset / sizeof(WCHAR), sz); + ptr[4 + sz / sizeof(WCHAR)] = '\0'; + sz += 4 * sizeof(WCHAR); + } + else { - if (!(ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz))) return STATUS_NO_MEMORY; - sz = RtlGetFullPathName_U(dos_path, sz, ptr, file_part); + sz = RtlGetFullPathName_U(dos_path, sizeof(local), ptr, file_part); + if (sz == 0) return STATUS_OBJECT_NAME_INVALID; + + if (sz > sizeof(local)) + { + if (!(ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz))) return STATUS_NO_MEMORY; + sz = RtlGetFullPathName_U(dos_path, sz, ptr, file_part); + } } sz += (1 /* NUL */ + 4 /* unc\ */ + 4 /* \??\ */) * sizeof(WCHAR); if (sz > MAXWORD) { - if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); - return STATUS_OBJECT_NAME_INVALID; + nts = STATUS_OBJECT_NAME_INVALID; + goto out; } ntpath->MaximumLength = sz; ntpath->Buffer = RtlAllocateHeap(GetProcessHeap(), 0, ntpath->MaximumLength); if (!ntpath->Buffer) { - if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); - return STATUS_NO_MEMORY; + nts = STATUS_NO_MEMORY; + goto out; } wcscpy(ntpath->Buffer, L"\\??\\"); @@ -225,8 +289,9 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U /* FIXME: cd filling */ +out: if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); - return STATUS_SUCCESS; + return nts; } /************************************************************************** diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index 66d029b2016..47afaf2aa3a 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -553,13 +553,11 @@ static void test_RtlDosPathNameToNtPathName_U(void) winetest_push_context("%s", debugstr_w(error_paths[i])); ret = pRtlDosPathNameToNtPathName_U(error_paths[i], &nameW, &file_part, NULL); - todo_wine_if(i == 3 || i == 4) ok(!ret, "Got %d.\n", ret); if (pRtlDosPathNameToNtPathName_U_WithStatus) { status = pRtlDosPathNameToNtPathName_U_WithStatus(error_paths[i], &nameW, &file_part, NULL); - todo_wine_if(i == 3 || i == 4) ok(status == STATUS_OBJECT_NAME_INVALID || broken(status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */), "Got status %#x.\n", status); }
1
0
0
0
Akihiro Sagawa : ntdll/tests: Expand path name tests with path + device name.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: b301e0285e78b3c873522dcae8c297bf4258746d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b301e0285e78b3c873522dca…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sat Jun 19 18:25:33 2021 +0900 ntdll/tests: Expand path name tests with path + device name. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 64c4582a40a512181bddd8d7e02f25f343049c7f) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/tests/path.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index e4adc992a28..66d029b2016 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -316,6 +316,11 @@ static void test_RtlGetFullPathName_U(void) { "...", "C:\\windows\\", NULL}, { "./foo", "C:\\windows\\foo", "foo"}, { "foo/..", "C:\\windows", "windows"}, + { "\\windows\\nul", "\\\\.\\nul", NULL}, + { "C:\\nonexistent\\nul", "\\\\.\\nul", NULL}, + { "C:\\con\\con", "\\\\.\\con", NULL}, + { "C:NUL.", "\\\\.\\NUL", NULL}, + { "C:NUL", "\\\\.\\NUL", NULL}, { "AUX", "\\\\.\\AUX", NULL}, { "COM1", "\\\\.\\COM1", NULL}, { "?<>*\"|:", "C:\\windows\\?<>*\"|:", "?<>*\"|:"}, @@ -458,6 +463,9 @@ static void test_RtlDosPathNameToNtPathName_U(void) {L"...", L"\\??\\C:\\windows\\", -1}, {L"./foo", L"\\??\\C:\\windows\\foo", 15}, {L"foo/..", L"\\??\\C:\\windows", 7}, + {L"\\windows\\nul", L"\\??\\nul", -1}, + {L"C:NUL.", L"\\??\\NUL", -1}, + {L"C:NUL", L"\\??\\NUL", -1}, {L"AUX" , L"\\??\\AUX", -1}, {L"COM1" , L"\\??\\COM1", -1}, {L"?<>*\"|:", L"\\??\\C:\\windows\\?<>*\"|:", 15}, @@ -533,32 +541,30 @@ static void test_RtlDosPathNameToNtPathName_U(void) {L"cOnOuT$", L"\\??\\cOnOuT$", -1, L"\\??\\C:\\windows\\cOnOuT$" /* winxp */ }, {L"CONERR$", L"\\??\\C:\\windows\\CONERR$", 15}, }; + static const WCHAR *error_paths[] = { + NULL, L"", L" ", L"C:\\nonexistent\\nul", L"C:\\con\\con" + }; GetCurrentDirectoryA(sizeof(curdir), curdir); SetCurrentDirectoryA("C:\\windows\\"); - ret = pRtlDosPathNameToNtPathName_U(NULL, &nameW, &file_part, NULL); - ok(!ret, "Got %d.\n", ret); - - ret = pRtlDosPathNameToNtPathName_U(L"", &nameW, &file_part, NULL); - ok(!ret, "Got %d.\n", ret); - - ret = pRtlDosPathNameToNtPathName_U(L" ", &nameW, &file_part, NULL); - ok(!ret, "Got %d.\n", ret); - - if (pRtlDosPathNameToNtPathName_U_WithStatus) + for (i = 0; i < ARRAY_SIZE(error_paths); ++i) { - status = pRtlDosPathNameToNtPathName_U_WithStatus(NULL, &nameW, &file_part, NULL); - ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */, - "Got status %#x.\n", status); + winetest_push_context("%s", debugstr_w(error_paths[i])); - status = pRtlDosPathNameToNtPathName_U_WithStatus(L"", &nameW, &file_part, NULL); - ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */, - "Got status %#x.\n", status); + ret = pRtlDosPathNameToNtPathName_U(error_paths[i], &nameW, &file_part, NULL); + todo_wine_if(i == 3 || i == 4) + ok(!ret, "Got %d.\n", ret); + + if (pRtlDosPathNameToNtPathName_U_WithStatus) + { + status = pRtlDosPathNameToNtPathName_U_WithStatus(error_paths[i], &nameW, &file_part, NULL); + todo_wine_if(i == 3 || i == 4) + ok(status == STATUS_OBJECT_NAME_INVALID || broken(status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */), + "Got status %#x.\n", status); + } - status = pRtlDosPathNameToNtPathName_U_WithStatus(L" ", &nameW, &file_part, NULL); - ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */, - "Got status %#x.\n", status); + winetest_pop_context(); } for (i = 0; i < ARRAY_SIZE(tests); ++i)
1
0
0
0
Brendan McGrath : kernelbase: Don't pass StdHandles with CREATE_NEW_CONSOLE.
by Alexandre Julliard
25 Feb '22
25 Feb '22
Module: wine Branch: oldstable Commit: 9de7231feab75e79219088dd9299e3cb6bdb1bdd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9de7231feab75e79219088dd…
Author: Brendan McGrath <brendan(a)redmandi.com> Date: Fri Jun 25 07:01:56 2021 +1000 kernelbase: Don't pass StdHandles with CREATE_NEW_CONSOLE. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51264
Signed-off-by: Brendan McGrath <brendan(a)redmandi.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 7539dd607b5a9840d13849a0668d9e8982e20c8c) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernelbase/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c index 992d50af0bc..e9ecf14e77d 100644 --- a/dlls/kernelbase/process.c +++ b/dlls/kernelbase/process.c @@ -202,7 +202,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename params->hStdOutput = startup->hStdOutput; params->hStdError = startup->hStdError; } - else if (flags & DETACHED_PROCESS) + else if (flags & (DETACHED_PROCESS | CREATE_NEW_CONSOLE)) { params->hStdInput = INVALID_HANDLE_VALUE; params->hStdOutput = INVALID_HANDLE_VALUE;
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
150
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Results per page:
10
25
50
100
200