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
August 2018
----- 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
618 discussions
Start a n
N
ew thread
Józef Kucia : d3d11/tests: Add a test for CopySubresourceRegion() with 1D textures.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 249e20128427ebf76a3531de4775cbaf30f01921 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=249e20128427ebf76a3531de…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 20 13:09:26 2018 +0200 d3d11/tests: Add a test for CopySubresourceRegion() with 1D textures. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index bc2a53e..e43b2f3 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -11908,6 +11908,94 @@ static void test_copy_subresource_region(void) release_test_context(&test_context); } +static void test_copy_subresource_region_1d(void) +{ + D3D11_SUBRESOURCE_DATA resource_data[4]; + struct d3d11_test_context test_context; + D3D11_TEXTURE1D_DESC texture1d_desc; + D3D11_TEXTURE2D_DESC texture2d_desc; + ID3D11DeviceContext *context; + struct resource_readback rb; + ID3D11Texture1D *texture1d; + ID3D11Texture2D *texture2d; + ID3D11Device *device; + unsigned int i, j; + D3D11_BOX box; + DWORD color; + HRESULT hr; + + static const DWORD bitmap_data[] = + { + 0xff0000ff, 0xff00ffff, 0xff00ff00, 0xffffff00, + 0xffff0000, 0xffff00ff, 0xff000000, 0xff7f7f7f, + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, + 0xffffffff, 0xff000000, 0xff000000, 0xff000000, + }; + + if (!init_test_context(&test_context, NULL)) + return; + device = test_context.device; + context = test_context.immediate_context; + + texture1d_desc.Width = 4; + texture1d_desc.MipLevels = 1; + texture1d_desc.ArraySize = 4; + texture1d_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + texture1d_desc.Usage = D3D11_USAGE_DEFAULT; + texture1d_desc.BindFlags = 0; + texture1d_desc.CPUAccessFlags = 0; + texture1d_desc.MiscFlags = 0; + + for (i = 0; i < ARRAY_SIZE(resource_data); ++i) + { + resource_data[i].pSysMem = &bitmap_data[4 * i]; + resource_data[i].SysMemPitch = texture1d_desc.Width * sizeof(bitmap_data); + resource_data[i].SysMemSlicePitch = 0; + } + + hr = ID3D11Device_CreateTexture1D(device, &texture1d_desc, resource_data, &texture1d); + ok(hr == S_OK, "Failed to create 1d texture, hr %#x.\n", hr); + + texture2d_desc.Width = 4; + texture2d_desc.Height = 4; + texture2d_desc.MipLevels = 1; + texture2d_desc.ArraySize = 1; + texture2d_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + texture2d_desc.SampleDesc.Count = 1; + texture2d_desc.SampleDesc.Quality = 0; + texture2d_desc.Usage = D3D11_USAGE_DEFAULT; + texture2d_desc.BindFlags = 0; + texture2d_desc.CPUAccessFlags = 0; + texture2d_desc.MiscFlags = 0; + + hr = ID3D11Device_CreateTexture2D(device, &texture2d_desc, NULL, &texture2d); + ok(hr == S_OK, "Failed to create 2d texture, hr %#x.\n", hr); + + set_box(&box, 0, 0, 0, 4, 1, 1); + for (i = 0; i < ARRAY_SIZE(resource_data); ++i) + { + ID3D11DeviceContext_CopySubresourceRegion(context, (ID3D11Resource *)texture2d, 0, + 0, i, 0, (ID3D11Resource *)texture1d, i, &box); + } + + get_texture_readback(texture2d, 0, &rb); + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + color = get_readback_color(&rb, j, i, 0); + ok(compare_color(color, bitmap_data[j + i * 4], 1), + "Got color 0x%08x at (%u, %u), expected 0x%08x.\n", + color, j, i, bitmap_data[j + i * 4]); + } + } + release_resource_readback(&rb); + + ID3D11Texture1D_Release(texture1d); + ID3D11Texture2D_Release(texture2d); + release_test_context(&test_context); +} + static void test_copy_subresource_region_3d(void) { ID3D11ShaderResourceView *dst_srv, *src_srv; @@ -28075,6 +28163,7 @@ START_TEST(d3d11) queue_test(test_fragment_coords); queue_test(test_update_subresource); queue_test(test_copy_subresource_region); + queue_test(test_copy_subresource_region_1d); queue_test(test_copy_subresource_region_3d); queue_test(test_resource_map); queue_for_each_feature_level(test_resource_access);
1
0
0
0
Józef Kucia : wined3d: Allow multisample resolve for typeless resources.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 24e609735b67ab7572262d6adbc9a1637f3ec165 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=24e609735b67ab7572262d6a…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 20 13:09:25 2018 +0200 wined3d: Allow multisample resolve for typeless resources. It may perform an undesired format conversion in rare cases. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=39754
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10core/tests/device.c | 30 +++++++++++++++--------------- dlls/d3d11/tests/d3d11.c | 30 +++++++++++++++--------------- dlls/wined3d/device.c | 4 ++-- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index f3c3d86..8c95ee3 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -16862,12 +16862,12 @@ static void test_multisample_resolve(void) DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, @@ -16877,69 +16877,69 @@ static void test_multisample_resolve(void) DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &color, 0xffe1bc89, TRUE}, + &color, 0xffe1bc89}, {DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &color, 0xffe1bc89, TRUE}, + &color, 0xffe1bc89}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &color, 0xffe1bc89, TRUE}, + &color, 0xffe1bc89}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, }; if (!init_test_context(&test_context)) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 60c88f4..bc2a53e 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -27295,12 +27295,12 @@ static void test_multisample_resolve(void) DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, @@ -27310,69 +27310,69 @@ static void test_multisample_resolve(void) DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &color, 0xffe1bc89, TRUE}, + &color, 0xffe1bc89}, {DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &color, 0xffe1bc89, TRUE}, + &color, 0xffe1bc89}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - &color, 0xffe1bc89, TRUE}, + &color, 0xffe1bc89}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM, - &green, 0xff00ff00, TRUE}, + &green, 0xff00ff00}, {DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM, - &color, 0xffbf7f40, TRUE}, + &color, 0xffbf7f40}, }; if (!init_test_context(&test_context, NULL)) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5079113..0f7ef67 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4293,10 +4293,10 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, if (wined3d_format_is_typeless(dst_resource->format) || wined3d_format_is_typeless(src_resource->format)) { - FIXME("Unhandled multisample resolve, dst_format %s, src_format %s, format %s.\n", + FIXME("Multisample resolve is not fully supported for typeless formats " + "(dst_format %s, src_format %s, format %s).\n", debug_d3dformat(dst_resource->format->id), debug_d3dformat(src_resource->format->id), debug_d3dformat(format_id)); - return; } if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D) {
1
0
0
0
Nikolay Sivov : ole32: Rename a helper to reflect its purpose better.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: bc5e9207d90d610d8ff87678013700af28c4452b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bc5e9207d90d610d8ff87678…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 16 08:56:14 2018 +0300 ole32: Rename a helper to reflect its purpose better. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/compobj.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 00555bf..66b1683 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1406,12 +1406,8 @@ static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath, return hr; } -/*********************************************************************** - * COM_RegReadPath [internal] - * - * Reads a registry value and expands it when necessary - */ -static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, DWORD dstlen) +/* Returns expanded dll path from the registry or activation context. */ +static BOOL get_object_dll_path(const struct class_reg_data *regdata, WCHAR *dst, DWORD dstlen) { DWORD ret; @@ -1438,7 +1434,7 @@ static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, D lstrcpynW(dst, src, dstlen); } } - return ret; + return !ret; } else { @@ -1451,7 +1447,7 @@ static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, D ActivateActCtx(regdata->u.actctx.hactctx, &cookie); ret = SearchPathW(NULL, nameW, dllW, dstlen, dst, NULL); DeactivateActCtx(0, cookie); - return !*dst; + return *dst != 0; } } @@ -1476,7 +1472,7 @@ static HRESULT apartment_hostobject(struct apartment *apt, TRACE("clsid %s, iid %s\n", debugstr_guid(¶ms->clsid), debugstr_guid(¶ms->iid)); - if (COM_RegReadPath(¶ms->regdata, dllpath, ARRAY_SIZE(dllpath)) != ERROR_SUCCESS) + if (!get_object_dll_path(¶ms->regdata, dllpath, ARRAY_SIZE(dllpath))) { /* failure: CLSID is not found in registry */ WARN("class %s not registered inproc\n", debugstr_guid(¶ms->clsid)); @@ -2970,7 +2966,7 @@ static HRESULT get_inproc_class_object(APARTMENT *apt, const struct class_reg_da else apartment_threaded = !apt->multi_threaded; - if (COM_RegReadPath(regdata, dllpath, ARRAY_SIZE(dllpath)) != ERROR_SUCCESS) + if (!get_object_dll_path(regdata, dllpath, ARRAY_SIZE(dllpath))) { /* failure: CLSID is not found in registry */ WARN("class %s not registered inproc\n", debugstr_guid(rclsid)); @@ -5086,7 +5082,7 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) regdata.u.hkey = hkey; regdata.hkey = TRUE; - if (COM_RegReadPath(®data, dllpath, ARRAY_SIZE(dllpath)) == ERROR_SUCCESS) + if (get_object_dll_path(®data, dllpath, ARRAY_SIZE(dllpath))) { static const WCHAR wszOle32[] = {'o','l','e','3','2','.','d','l','l',0}; if (!strcmpiW(dllpath, wszOle32))
1
0
0
0
Nikolay Sivov : ole32: Try 'dll' extension when looking for registration-free modules.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 0430efb4a6b1a1413a887139dd3bd69945c1baff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0430efb4a6b1a1413a887139…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 16 08:56:13 2018 +0300 ole32: Try 'dll' extension when looking for registration-free modules. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/compobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 3487cca..00555bf 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1442,13 +1442,14 @@ static DWORD COM_RegReadPath(const struct class_reg_data *regdata, WCHAR *dst, D } else { + static const WCHAR dllW[] = {'.','d','l','l',0}; ULONG_PTR cookie; WCHAR *nameW; *dst = 0; nameW = (WCHAR*)((BYTE*)regdata->u.actctx.section + regdata->u.actctx.data->name_offset); ActivateActCtx(regdata->u.actctx.hactctx, &cookie); - ret = SearchPathW(NULL, nameW, NULL, dstlen, dst, NULL); + ret = SearchPathW(NULL, nameW, dllW, dstlen, dst, NULL); DeactivateActCtx(0, cookie); return !*dst; }
1
0
0
0
Józef Kucia : winevulkan: Properly retrieve queues that were created with non-zero flags.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 6d80924ae4a4adae5581c18110352507dd53897c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6d80924ae4a4adae5581c181…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 20 10:05:12 2018 +0200 winevulkan: Properly retrieve queues that were created with non-zero flags. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 2 +- dlls/winevulkan/vulkan.c | 21 ++++++++++++++++++--- dlls/winevulkan/vulkan_thunks.h | 2 ++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 73bba78..3be6a8d 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -161,7 +161,7 @@ FUNCTION_OVERRIDES = { "vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False}, "vkGetDeviceProcAddr" : {"dispatch" : False, "driver" : True, "thunk" : False}, "vkGetDeviceQueue" : {"dispatch": True, "driver" : False, "thunk" : False}, - "vkGetDeviceQueue2" : {"dispatch": False, "driver" : False, "thunk" : False}, + "vkGetDeviceQueue2" : {"dispatch": True, "driver" : False, "thunk" : False}, "vkQueueSubmit" : {"dispatch": True, "driver" : False, "thunk" : False}, # VK_KHR_surface diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index e588d53..a1e970d 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -171,6 +171,7 @@ static void wine_vk_command_buffers_free(struct VkDevice_T *device, VkCommandPoo static struct VkQueue_T *wine_vk_device_alloc_queues(struct VkDevice_T *device, uint32_t family_index, uint32_t queue_count, VkDeviceQueueCreateFlags flags) { + VkDeviceQueueInfo2 queue_info; struct VkQueue_T *queues; unsigned int i; @@ -188,10 +189,24 @@ static struct VkQueue_T *wine_vk_device_alloc_queues(struct VkDevice_T *device, queue->device = device; queue->flags = flags; - /* The native device was already allocated with the required number of queues, - * so just fetch them from there. + /* The Vulkan spec says: + * + * "vkGetDeviceQueue must only be used to get queues that were created + * with the flags parameter of VkDeviceQueueCreateInfo set to zero." */ - device->funcs.p_vkGetDeviceQueue(device->device, family_index, i, &queue->queue); + if (flags && device->funcs.p_vkGetDeviceQueue2) + { + queue_info.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2; + queue_info.pNext = NULL; + queue_info.flags = flags; + queue_info.queueFamilyIndex = family_index; + queue_info.queueIndex = i; + device->funcs.p_vkGetDeviceQueue2(device->device, &queue_info, &queue->queue); + } + else + { + device->funcs.p_vkGetDeviceQueue(device->device, family_index, i, &queue->queue); + } } return queues; diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index a03d115..94e56bb 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -889,6 +889,7 @@ struct vulkan_device_funcs VkResult (*p_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice, VkSurfaceKHR, VkDeviceGroupPresentModeFlagsKHR *); void (*p_vkGetDeviceMemoryCommitment)(VkDevice, VkDeviceMemory, VkDeviceSize *); void (*p_vkGetDeviceQueue)(VkDevice, uint32_t, uint32_t, VkQueue *); + void (*p_vkGetDeviceQueue2)(VkDevice, const VkDeviceQueueInfo2 *, VkQueue *); VkResult (*p_vkGetEventStatus)(VkDevice, VkEvent); VkResult (*p_vkGetFenceStatus)(VkDevice, VkFence); #if defined(USE_STRUCT_CONVERSION) @@ -1178,6 +1179,7 @@ struct vulkan_instance_funcs USE_VK_FUNC(vkGetDeviceGroupSurfacePresentModesKHR) \ USE_VK_FUNC(vkGetDeviceMemoryCommitment) \ USE_VK_FUNC(vkGetDeviceQueue) \ + USE_VK_FUNC(vkGetDeviceQueue2) \ USE_VK_FUNC(vkGetEventStatus) \ USE_VK_FUNC(vkGetFenceStatus) \ USE_VK_FUNC(vkGetImageMemoryRequirements) \
1
0
0
0
Jacek Caban : winegcc: Support distros using plain lib for 32-bit libraries in get_lib_dir.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: b9427efe3e16a8aa3d948be37248f24f537610d1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b9427efe3e16a8aa3d948be3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Aug 20 13:58:40 2018 +0200 winegcc: Support distros using plain lib for 32-bit libraries in get_lib_dir. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index b586c04..05a0ebb 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -507,6 +507,9 @@ static char *get_lib_dir( struct options *opts ) { memcpy( p + 4, bit_suffix, 2 ); if (check_platform( opts, buffer )) goto found; + memmove( p + 4, p + 6, strlen( p + 6 ) + 1 ); + if (check_platform( opts, buffer )) goto found; + memmove( p + 6, p + 4, strlen( p + 4 ) + 1 ); memcpy( p + 4, other_bit_suffix, 2 ); } }
1
0
0
0
Nikolay Sivov : wmp: Improve URL property handling.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 27338bc4b52da8d92fec72faa8dd47c23ebc2b41 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27338bc4b52da8d92fec72fa…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 20 11:58:33 2018 +0300 wmp: Improve URL property handling. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wmp/player.c | 17 ++++++----------- dlls/wmp/tests/media.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c index fd8c17d..519ffa1 100644 --- a/dlls/wmp/player.c +++ b/dlls/wmp/player.c @@ -28,7 +28,7 @@ static ATOM player_msg_class; static INIT_ONCE class_init_once; static UINT WM_WMPEVENT; static const WCHAR WMPmessageW[] = {'_', 'W', 'M', 'P', 'M','e','s','s','a','g','e',0}; - +static const WCHAR emptyW[] = {0}; static void update_state(WindowsMediaPlayer *wmp, LONG type, LONG state) { @@ -135,9 +135,8 @@ static HRESULT WINAPI WMPPlayer4_get_URL(IWMPPlayer4 *iface, BSTR *url) TRACE("(%p)->(%p)\n", This, url); - if(This->media == NULL) { - return S_FALSE; - } + if (!This->media) + return return_bstr(emptyW, url); return return_bstr(This->media->url, url); } @@ -147,10 +146,8 @@ static HRESULT WINAPI WMPPlayer4_put_URL(IWMPPlayer4 *iface, BSTR url) WindowsMediaPlayer *This = impl_from_IWMPPlayer4(iface); IWMPMedia *media; HRESULT hres; + TRACE("(%p)->(%s)\n", This, debugstr_w(url)); - if(url == NULL) { - return E_POINTER; - } hres = create_media_from_url(url, 0.0, &media); @@ -161,9 +158,8 @@ static HRESULT WINAPI WMPPlayer4_put_URL(IWMPPlayer4 *iface, BSTR url) } if (SUCCEEDED(hres)) { update_state(This, DISPID_WMPCOREEVENT_PLAYSTATECHANGE, wmppsReady); - if (This->auto_start == VARIANT_TRUE) { - hres = IWMPControls_play(&This->IWMPControls_iface); - } + if (This->auto_start == VARIANT_TRUE) + IWMPControls_play(&This->IWMPControls_iface); } return hres; @@ -2025,7 +2021,6 @@ WMPMedia *unsafe_impl_from_IWMPMedia(IWMPMedia *iface) HRESULT create_media_from_url(BSTR url, double duration, IWMPMedia **ppMedia) { - static const WCHAR emptyW[] = {0}; WMPMedia *media; media = heap_alloc_zero(sizeof(*media)); diff --git a/dlls/wmp/tests/media.c b/dlls/wmp/tests/media.c index bd9aefc..dd6fdcb 100644 --- a/dlls/wmp/tests/media.c +++ b/dlls/wmp/tests/media.c @@ -562,6 +562,54 @@ todo_wine IWMPPlayer4_Release(player); } +static void test_player_url(void) +{ + IWMPPlayer4 *player; + BSTR str, str2; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_WindowsMediaPlayer, NULL, CLSCTX_INPROC_SERVER, &IID_IWMPPlayer4, (void **)&player); + if (hr == REGDB_E_CLASSNOTREG) + { + win_skip("CLSID_WindowsMediaPlayer is not registered.\n"); + return; + } + ok(hr == S_OK, "Failed to create media player instance, hr %#x.\n", hr); + + hr = IWMPPlayer4_get_URL(player, &str); + ok(hr == S_OK, "Failed to get url, hr %#x.\n", hr); + ok(*str == 0, "Unexpected url %s.\n", wine_dbgstr_w(str)); + SysFreeString(str); + + str2 = SysAllocString(mp3file); + hr = IWMPPlayer4_put_URL(player, str2); + ok(hr == S_OK, "Failed to set url, hr %#x.\n", hr); + + hr = IWMPPlayer4_put_URL(player, NULL); + ok(hr == S_OK, "Failed to set url, hr %#x.\n", hr); + hr = IWMPPlayer4_get_URL(player, &str); + ok(hr == S_OK, "Failed to set url, hr %#x.\n", hr); + ok(*str == 0, "Unexpected url, %s.\n", wine_dbgstr_w(str)); + SysFreeString(str); + + /* Empty url */ + hr = IWMPPlayer4_put_URL(player, str2); + ok(hr == S_OK, "Failed to set url, hr %#x.\n", hr); + + str = SysAllocStringLen(NULL, 0); + hr = IWMPPlayer4_put_URL(player, str); + ok(hr == S_OK, "Failed to set url, hr %#x.\n", hr); + SysFreeString(str); + + hr = IWMPPlayer4_get_URL(player, &str); + ok(hr == S_OK, "Failed to set url, hr %#x.\n", hr); + ok(*str == 0, "Unexpected url, %s.\n", wine_dbgstr_w(str)); + SysFreeString(str); + + SysFreeString(str2); + IWMPPlayer4_Release(player); +} + START_TEST(media) { CoInitialize(NULL); @@ -571,6 +619,7 @@ START_TEST(media) completed_event = CreateEventW(NULL, FALSE, FALSE, NULL); test_media_item(); + test_player_url(); if (test_wmp()) { test_completion_event(); } else {
1
0
0
0
Dmitry Timoshkov : kernel32: Set %ALLUSERSPROFILE% variable to the same value as %ProgramData%.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 54ec72bc09126c35bf5bd8df67195c91718047b7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54ec72bc09126c35bf5bd8df…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 17 18:14:34 2018 +0800 kernel32: Set %ALLUSERSPROFILE% variable to the same value as %ProgramData%. This matches what recent Windows versions set in the process environment. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index d615f06..b12c37f 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -516,7 +516,6 @@ static void set_additional_environment(void) 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'P','r','o','f','i','l','e','L','i','s','t',0}; static const WCHAR profiles_valueW[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0}; - static const WCHAR all_users_valueW[] = {'A','l','l','U','s','e','r','s','P','r','o','f','i','l','e','\0'}; static const WCHAR public_valueW[] = {'P','u','b','l','i','c',0}; static const WCHAR computernameW[] = {'C','O','M','P','U','T','E','R','N','A','M','E',0}; static const WCHAR allusersW[] = {'A','L','L','U','S','E','R','S','P','R','O','F','I','L','E',0}; @@ -524,7 +523,7 @@ static void set_additional_environment(void) static const WCHAR publicW[] = {'P','U','B','L','I','C',0}; OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; - WCHAR *profile_dir = NULL, *all_users_dir = NULL, *program_data_dir = NULL, *public_dir = NULL; + WCHAR *profile_dir = NULL, *program_data_dir = NULL, *public_dir = NULL; WCHAR buf[MAX_COMPUTERNAME_LENGTH+1]; HANDLE hkey; DWORD len; @@ -546,28 +545,14 @@ static void set_additional_environment(void) if (!NtOpenKey( &hkey, KEY_READ, &attr )) { profile_dir = get_reg_value( hkey, profiles_valueW ); - all_users_dir = get_reg_value( hkey, all_users_valueW ); program_data_dir = get_reg_value( hkey, programdataW ); public_dir = get_reg_value( hkey, public_valueW ); NtClose( hkey ); } - if (profile_dir && all_users_dir) - { - WCHAR *value, *p; - - len = strlenW(profile_dir) + strlenW(all_users_dir) + 2; - value = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); - strcpyW( value, profile_dir ); - p = value + strlenW(value); - if (p > value && p[-1] != '\\') *p++ = '\\'; - strcpyW( p, all_users_dir ); - SetEnvironmentVariableW( allusersW, value ); - HeapFree( GetProcessHeap(), 0, value ); - } - if (program_data_dir) { + SetEnvironmentVariableW( allusersW, program_data_dir ); SetEnvironmentVariableW( programdataW, program_data_dir ); } @@ -576,7 +561,6 @@ static void set_additional_environment(void) SetEnvironmentVariableW( publicW, public_dir ); } - HeapFree( GetProcessHeap(), 0, all_users_dir ); HeapFree( GetProcessHeap(), 0, profile_dir ); HeapFree( GetProcessHeap(), 0, program_data_dir ); HeapFree( GetProcessHeap(), 0, public_dir );
1
0
0
0
Fabian Maurer : comctl32/combo: Implement logic for setting and getting dropdown height.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 313c63e194aebdd517b3a85f8fe4d83acf170b62 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=313c63e194aebdd517b3a85f…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Aug 19 21:03:55 2018 +0200 comctl32/combo: Implement logic for setting and getting dropdown height. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/combo.c | 43 +++++++++++++++++++++++-------------------- dlls/comctl32/comctl32.h | 1 + dlls/comctl32/tests/combo.c | 7 +------ include/commctrl.h | 5 +++++ 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c index 712e272..12ea7bb 100644 --- a/dlls/comctl32/combo.c +++ b/dlls/comctl32/combo.c @@ -18,10 +18,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * - * TODO: - * - ComboBox_[GS]etMinVisible() - * - CB_GETMINVISIBLE, CB_SETMINVISIBLE - * - CB_SETTOPINDEX */ #include <stdarg.h> @@ -459,6 +455,11 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG */ lphc->wState |= CBF_MEASUREITEM; + /* + * Per default the comctl32 version of combo shows up to 30 items + */ + lphc->visibleItems = 30; + /* M$ IE 3.01 actually creates (and rapidly destroys) an ownerless combobox */ if( lphc->owner || !(style & WS_VISIBLE) ) @@ -1010,23 +1011,18 @@ static void CBDropDown( LPHEADCOMBO lphc ) if (nItems > 0) { - int nHeight; - int nIHeight; - - nIHeight = (int)SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, 0, 0); + int nIHeight = (int)SendMessageW(lphc->hWndLBox, LB_GETITEMHEIGHT, 0, 0); - nHeight = nIHeight*nItems; - - if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE()) - nDroppedHeight = nHeight + COMBO_YBORDERSIZE(); - - if (nDroppedHeight < nHeight) - { - if (nItems < 5) - nDroppedHeight = (nItems+1)*nIHeight; - else if (nDroppedHeight < 6*nIHeight) - nDroppedHeight = 6*nIHeight; - } + if (lphc->dwStyle & CBS_NOINTEGRALHEIGHT) + { + nDroppedHeight -= 1; + } + else + { + if (nItems > lphc->visibleItems) + nItems = lphc->visibleItems; + nDroppedHeight = nItems * nIHeight + COMBO_YBORDERSIZE(); + } } r.left = rect.left; @@ -2135,6 +2131,13 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam return SendMessageW(lphc->hWndEdit, EM_LIMITTEXT, wParam, lParam); return TRUE; + case CB_GETMINVISIBLE: + return lphc->visibleItems; + + case CB_SETMINVISIBLE: + lphc->visibleItems = (INT)wParam; + return TRUE; + default: if (message >= WM_USER) WARN("unknown msg WM_USER+%04x wp=%04lx lp=%08lx\n", message - WM_USER, wParam, lParam ); diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h index 67da0e1..b68b914 100644 --- a/dlls/comctl32/comctl32.h +++ b/dlls/comctl32/comctl32.h @@ -149,6 +149,7 @@ typedef struct INT fixedOwnerDrawHeight; INT droppedWidth; /* last two are not used unless set */ INT editHeight; /* explicitly */ + INT visibleItems; } HEADCOMBO, *LPHEADCOMBO; extern BOOL COMBO_FlipListbox(HEADCOMBO *lphc, BOOL ok, BOOL bRedrawButton) DECLSPEC_HIDDEN; diff --git a/dlls/comctl32/tests/combo.c b/dlls/comctl32/tests/combo.c index 5fee206..923d826 100644 --- a/dlls/comctl32/tests/combo.c +++ b/dlls/comctl32/tests/combo.c @@ -1165,7 +1165,7 @@ static void test_combo_dropdown_size(DWORD style) int limit; } info_height[] = { {33, 50, -1}, - {35, 50, 40}, + {35, 100, 40}, {15, 50, 3}, }; @@ -1182,7 +1182,6 @@ static void test_combo_dropdown_size(DWORD style) info_test->height_combo, hMainWnd, (HMENU)COMBO_ID, NULL, 0); min_visible_expected = SendMessageA(hCombo, CB_GETMINVISIBLE, 0, 0); - todo_wine ok(min_visible_expected == 30, "Unexpected number of items %d.\n", min_visible_expected); cbInfo.cbSize = sizeof(COMBOBOXINFO); @@ -1202,10 +1201,8 @@ static void test_combo_dropdown_size(DWORD style) min_visible_expected = info_test->limit; ret = SendMessageA(hCombo, CB_SETMINVISIBLE, min_visible_expected, 0); - todo_wine ok(ret, "Failed to set visible limit.\n"); min_visible_actual = SendMessageA(hCombo, CB_GETMINVISIBLE, 0, 0); - todo_wine ok(min_visible_expected == min_visible_actual, "test %d: unexpected number of items %d.\n", test, min_visible_actual); } @@ -1242,7 +1239,6 @@ static void test_combo_dropdown_size(DWORD style) if (expected_height_list < 0) expected_height_list = 0; - todo_wine ok(expected_height_list == height_list, "Test %d, expected list height to be %d, got %d\n", test, expected_height_list, height_list); } @@ -1250,7 +1246,6 @@ static void test_combo_dropdown_size(DWORD style) { expected_height_list = min(info_test->num_items, min_visible_expected) * height_item; - todo_wine ok(expected_height_list == height_list, "Test %d, expected list height to be %d, got %d\n", test, expected_height_list, height_list); } diff --git a/include/commctrl.h b/include/commctrl.h index 455f8a4..936b2e4 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -5220,6 +5220,11 @@ static const WCHAR WC_COMBOBOXW[] = { 'C','o','m','b','o','B','o','x',0 }; #define CB_SETCUEBANNER (CBM_FIRST + 3) #define CB_GETCUEBANNER (CBM_FIRST + 4) +#define ComboBox_GetMinVisible(hwnd) \ + ((int)SendMessage((hwnd), CB_GETMINVISIBLE, 0, 0)) +#define ComboBox_SetMinVisible(hwnd, count) \ + ((BOOL)SendMessage((hwnd), CB_SETMINVISIBLE, (WPARAM)(count), 0)) + /************************************************************************** * Edit control */
1
0
0
0
Fabian Maurer : user32/combo: Properly set dropdown height.
by Alexandre Julliard
20 Aug '18
20 Aug '18
Module: wine Branch: master Commit: 3d0be0bad8eca72e67199ebfb451150d58494ba3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3d0be0bad8eca72e67199ebf…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Aug 19 21:03:54 2018 +0200 user32/combo: Properly set dropdown height. Now that user32 and comctl32 combo are separated, this won't lead to a regression anymore. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/combo.c | 8 -------- dlls/user32/tests/combo.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index dcfa661..31ec6af 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1029,14 +1029,6 @@ static void CBDropDown( LPHEADCOMBO lphc ) if (nHeight < nDroppedHeight - COMBO_YBORDERSIZE()) nDroppedHeight = nHeight + COMBO_YBORDERSIZE(); - - if (nDroppedHeight < nHeight) - { - if (nItems < 5) - nDroppedHeight = (nItems+1)*nIHeight; - else if (nDroppedHeight < 6*nIHeight) - nDroppedHeight = 6*nIHeight; - } } r.left = rect.left; diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index 3358e84..0d3b1b1 100644 --- a/dlls/user32/tests/combo.c +++ b/dlls/user32/tests/combo.c @@ -688,25 +688,25 @@ static void test_listbox_size(DWORD style) int height_combo; BOOL todo; } info_height[] = { - {2, 24, TRUE}, + {2, 24, FALSE}, {2, 41, TRUE}, - {2, 42, TRUE}, - {2, 50, TRUE}, + {2, 42, FALSE}, + {2, 50, FALSE}, {2, 60}, {2, 80}, {2, 89}, {2, 90}, {2, 100}, - {10, 24, TRUE}, + {10, 24, FALSE}, {10, 41, TRUE}, - {10, 42, TRUE}, - {10, 50, TRUE}, - {10, 60, TRUE}, - {10, 80, TRUE}, + {10, 42, FALSE}, + {10, 50, FALSE}, + {10, 60, FALSE}, + {10, 80, FALSE}, {10, 89, TRUE}, - {10, 90, TRUE}, - {10, 100, TRUE}, + {10, 90, FALSE}, + {10, 100, FALSE}, }; for(test = 0; test < ARRAY_SIZE(info_height); test++)
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
62
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
Results per page:
10
25
50
100
200