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
June 2011
----- 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
809 discussions
Start a n
N
ew thread
Andrew Nguyen : dxdiag: Avoid C99 list initialization constructs.
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 6b48a9e7c61eaa517738c27957a0b3935f5fc77e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b48a9e7c61eaa517738c2795…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:11:11 2011 -0500 dxdiag: Avoid C99 list initialization constructs. --- programs/dxdiag/information.c | 161 +++++++++++++++++++++++------------------ programs/dxdiag/output.c | 150 ++++++++++++++++++++++++-------------- 2 files changed, 185 insertions(+), 126 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6b48a9e7c61eaa517738c…
1
0
0
0
Andrew Nguyen : dxdiagn: Add additional adapter identifier properties for DxDiag_DisplayDevices subcontainers .
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 7664adb2159e27975b4521ffb88dc30032d8ddb3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7664adb2159e27975b4521ffb…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:11:07 2011 -0500 dxdiagn: Add additional adapter identifier properties for DxDiag_DisplayDevices subcontainers. --- dlls/dxdiagn/provider.c | 106 ++++++++++++++++++++++++++++++++-------- dlls/dxdiagn/tests/container.c | 12 +++++ 2 files changed, 97 insertions(+), 21 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7664adb2159e27975b452…
1
0
0
0
Andrew Nguyen : dxdiagn: Remove the Direct3D usage in the fallback display information code.
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 77c194fff8aff897cf113195c022884212d661e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77c194fff8aff897cf113195c…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:11:04 2011 -0500 dxdiagn: Remove the Direct3D usage in the fallback display information code. --- dlls/dxdiagn/provider.c | 35 +---------------------------------- 1 files changed, 1 insertions(+), 34 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 26a6916..f01c0ea 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -171,37 +171,6 @@ HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, R return IDxDiagProviderImpl_QueryInterface ((PDXDIAGPROVIDER)provider, riid, ppobj); } -static void get_display_device_id(WCHAR *szIdentifierBuffer) -{ - static const WCHAR szNA[] = {'n','/','a',0}; - - HRESULT hr = E_FAIL; - - HMODULE d3d9_handle; - IDirect3D9 *(WINAPI *pDirect3DCreate9)(UINT) = NULL; - IDirect3D9 *pD3d = NULL; - D3DADAPTER_IDENTIFIER9 adapter_ident; - - /* Retrieves the display device identifier from the d3d9 implementation. */ - d3d9_handle = LoadLibraryA("d3d9.dll"); - if(d3d9_handle) - pDirect3DCreate9 = (void *)GetProcAddress(d3d9_handle, "Direct3DCreate9"); - if(pDirect3DCreate9) - pD3d = pDirect3DCreate9(D3D_SDK_VERSION); - if(pD3d) - hr = IDirect3D9_GetAdapterIdentifier(pD3d, D3DADAPTER_DEFAULT, 0, &adapter_ident); - if(SUCCEEDED(hr)) { - StringFromGUID2(&adapter_ident.DeviceIdentifier, szIdentifierBuffer, 39); - } else { - memcpy(szIdentifierBuffer, szNA, sizeof(szNA)); - } - - if (pD3d) - IDirect3D9_Release(pD3d); - if (d3d9_handle) - FreeLibrary(d3d9_handle); -} - static void free_property_information(IDxDiagContainerImpl_Property *prop) { VariantClear(&prop->vProp); @@ -977,9 +946,7 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container } } - get_display_device_id(buffer); - - hr = add_bstr_property(display_adapter, szDeviceIdentifier, buffer); + hr = add_bstr_property(display_adapter, szDeviceIdentifier, szEmpty); if (FAILED(hr)) goto cleanup;
1
0
0
0
Andrew Nguyen : dxdiagn: Extract the fallback display information code to a separate function.
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: f750cf33062415fae38660a674acc833bf054ff7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f750cf33062415fae38660a67…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:10:58 2011 -0500 dxdiagn: Extract the fallback display information code to a separate function. --- dlls/dxdiagn/provider.c | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 9cfa483..26a6916 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -897,7 +897,7 @@ cleanup: return hr; } -static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) +static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container *node) { static const WCHAR szAdapterID[] = {'0',0}; @@ -910,11 +910,6 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) DWORD tmp; WCHAR buffer[256]; - /* Try to use Direct3D to obtain the required information first. */ - hr = fill_display_information_d3d(node); - if (hr != E_FAIL) - return hr; - display_adapter = allocate_information_node(szAdapterID); if (!display_adapter) return E_OUTOFMEMORY; @@ -933,8 +928,8 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) return hr; } - /* For now, silently ignore a failure from DirectDrawCreateEx. */ - hr = DirectDrawCreateEx(NULL, (LPVOID *)&pDirectDraw, &IID_IDirectDraw7, NULL); + /* Silently ignore a failure from DirectDrawCreateEx. */ + hr = DirectDrawCreateEx(NULL, (void **)&pDirectDraw, &IID_IDirectDraw7, NULL); if (FAILED(hr)) return S_OK; @@ -945,7 +940,7 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) { static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0}; - snprintfW(buffer, sizeof(buffer)/sizeof(buffer[0]), mem_fmt, ((float)tmp) / 1000000.0); + snprintfW(buffer, sizeof(buffer)/sizeof(buffer[0]), mem_fmt, tmp / 1000000.0f); hr = add_bstr_property(display_adapter, szDisplayMemoryLocalized, buffer); if (FAILED(hr)) @@ -1010,6 +1005,18 @@ cleanup: return hr; } +static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) +{ + HRESULT hr; + + /* Try to use Direct3D to obtain the required information first. */ + hr = fill_display_information_d3d(node); + if (hr != E_FAIL) + return hr; + + return fill_display_information_fallback(node); +} + static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node) { static const WCHAR DxDiag_SoundDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0};
1
0
0
0
Andrew Nguyen : dxdiagn: Start using Direct3D to obtain better reported adapter information for DxDiag_DisplayDevices .
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 2d75211bd258bc6fc7dea31bb3dc68c005e8c7a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d75211bd258bc6fc7dea31bb…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:10:52 2011 -0500 dxdiagn: Start using Direct3D to obtain better reported adapter information for DxDiag_DisplayDevices. --- dlls/dxdiagn/Makefile.in | 2 +- dlls/dxdiagn/provider.c | 177 ++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 165 insertions(+), 14 deletions(-) diff --git a/dlls/dxdiagn/Makefile.in b/dlls/dxdiagn/Makefile.in index b522547..6276e74 100644 --- a/dlls/dxdiagn/Makefile.in +++ b/dlls/dxdiagn/Makefile.in @@ -1,5 +1,5 @@ MODULE = dxdiagn.dll -IMPORTS = strmiids dxguid uuid ddraw version ole32 oleaut32 psapi user32 advapi32 +IMPORTS = strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 psapi user32 advapi32 C_SRCS = \ container.c \ diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 9d19558..9cfa483 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -48,6 +48,19 @@ static const WCHAR szEmpty[] = {0}; static HRESULT build_information_tree(IDxDiagContainerImpl_Container **pinfo_root); static void free_information_tree(IDxDiagContainerImpl_Container *node); +static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0}; +static const WCHAR szDeviceName[] = {'s','z','D','e','v','i','c','e','N','a','m','e',0}; +static const WCHAR szKeyDeviceID[] = {'s','z','K','e','y','D','e','v','i','c','e','I','D',0}; +static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0}; +static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0}; +static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0}; +static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0}; +static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0}; +static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0}; +static const WCHAR dwBpp[] = {'d','w','B','p','p',0}; +static const WCHAR szDisplayMemoryLocalized[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','L','o','c','a','l','i','z','e','d',0}; +static const WCHAR szDisplayMemoryEnglish[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; + /* IDxDiagProvider IUnknown parts follow: */ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj) { @@ -738,21 +751,154 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) return S_OK; } -static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) +/* The logic from pixelformat_for_depth() in dlls/wined3d/utils.c is reversed. */ +static DWORD depth_for_pixelformat(D3DFORMAT format) +{ + switch (format) + { + case D3DFMT_P8: return 8; + case D3DFMT_X1R5G5B5: return 15; + case D3DFMT_R5G6B5: return 16; + /* This case will fail to distinguish an original bpp of 24. */ + case D3DFMT_X8R8G8B8: return 32; + default: + FIXME("Unknown D3DFORMAT %d, returning 32 bpp\n", format); + return 32; + } +} + +static BOOL get_texture_memory(GUID *adapter, DWORD *available_mem) { - static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0}; - static const WCHAR szDeviceName[] = {'s','z','D','e','v','i','c','e','N','a','m','e',0}; - static const WCHAR szKeyDeviceID[] = {'s','z','K','e','y','D','e','v','i','c','e','I','D',0}; - static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0}; - static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0}; - static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0}; - static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0}; - static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0}; - static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0}; - static const WCHAR dwBpp[] = {'d','w','B','p','p',0}; - static const WCHAR szDisplayMemoryLocalized[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','L','o','c','a','l','i','z','e','d',0}; - static const WCHAR szDisplayMemoryEnglish[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; + IDirectDraw7 *pDirectDraw; + HRESULT hr; + DDSCAPS2 dd_caps; + + hr = DirectDrawCreateEx(adapter, (void **)&pDirectDraw, &IID_IDirectDraw7, NULL); + if (SUCCEEDED(hr)) + { + dd_caps.dwCaps = DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; + dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.dwCaps4 = 0; + hr = IDirectDraw7_GetAvailableVidMem(pDirectDraw, &dd_caps, available_mem, NULL); + IDirectDraw7_Release(pDirectDraw); + if (SUCCEEDED(hr)) + return TRUE; + } + + return FALSE; +} + +static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node) +{ + IDxDiagContainerImpl_Container *display_adapter; + HRESULT hr; + IDirect3D9 *pDirect3D9; + WCHAR buffer[256]; + UINT index, count; + + pDirect3D9 = Direct3DCreate9(D3D_SDK_VERSION); + if (!pDirect3D9) + return E_FAIL; + + count = IDirect3D9_GetAdapterCount(pDirect3D9); + for (index = 0; index < count; index++) + { + static const WCHAR adapterid_fmtW[] = {'%','u',0}; + static const WCHAR id_fmtW[] = {'0','x','%','0','4','x',0}; + static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0}; + + D3DADAPTER_IDENTIFIER9 adapter_info; + D3DDISPLAYMODE adapter_mode; + DWORD available_mem = 0; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), adapterid_fmtW, index); + display_adapter = allocate_information_node(buffer); + if (!display_adapter) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + add_subcontainer(node, display_adapter); + + hr = IDirect3D9_GetAdapterIdentifier(pDirect3D9, index, 0, &adapter_info); + if (SUCCEEDED(hr)) + { + WCHAR devicenameW[sizeof(adapter_info.DeviceName)]; + WCHAR descriptionW[sizeof(adapter_info.Description)]; + + MultiByteToWideChar(CP_ACP, 0, adapter_info.DeviceName, -1, devicenameW, sizeof(devicenameW)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, adapter_info.Description, -1, descriptionW, sizeof(descriptionW)/sizeof(WCHAR)); + + hr = add_bstr_property(display_adapter, szDeviceName, devicenameW); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDescription, descriptionW); + if (FAILED(hr)) + goto cleanup; + + StringFromGUID2(&adapter_info.DeviceIdentifier, buffer, 39); + hr = add_bstr_property(display_adapter, szDeviceIdentifier, buffer); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), id_fmtW, adapter_info.VendorId); + hr = add_bstr_property(display_adapter, szVendorId, buffer); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), id_fmtW, adapter_info.DeviceId); + hr = add_bstr_property(display_adapter, szDeviceId, buffer); + if (FAILED(hr)) + goto cleanup; + } + + hr = IDirect3D9_GetAdapterDisplayMode(pDirect3D9, index, &adapter_mode); + if (SUCCEEDED(hr)) + { + hr = add_ui4_property(display_adapter, dwWidth, adapter_mode.Width); + if (FAILED(hr)) + goto cleanup; + hr = add_ui4_property(display_adapter, dwHeight, adapter_mode.Height); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(display_adapter, dwBpp, depth_for_pixelformat(adapter_mode.Format)); + if (FAILED(hr)) + goto cleanup; + } + + hr = add_bstr_property(display_adapter, szKeyDeviceKey, szEmpty); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szKeyDeviceID, szEmpty); + if (FAILED(hr)) + goto cleanup; + + if (!get_texture_memory(&adapter_info.DeviceIdentifier, &available_mem)) + WARN("get_texture_memory helper failed\n"); + + snprintfW(buffer, sizeof(buffer)/sizeof(buffer[0]), mem_fmt, available_mem / 1000000.0f); + + hr = add_bstr_property(display_adapter, szDisplayMemoryLocalized, buffer); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer); + if (FAILED(hr)) + goto cleanup; + } + + hr = S_OK; +cleanup: + IDirect3D9_Release(pDirect3D9); + return hr; +} + +static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) +{ static const WCHAR szAdapterID[] = {'0',0}; IDxDiagContainerImpl_Container *display_adapter; @@ -764,6 +910,11 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) DWORD tmp; WCHAR buffer[256]; + /* Try to use Direct3D to obtain the required information first. */ + hr = fill_display_information_d3d(node); + if (hr != E_FAIL) + return hr; + display_adapter = allocate_information_node(szAdapterID); if (!display_adapter) return E_OUTOFMEMORY;
1
0
0
0
Andrew Nguyen : dxdiagn/tests: Add tests for some DxDiag_DisplayDevices subcontainer properties.
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 55296f6edbf90309c8e9752efcdd2dcdd8311581 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55296f6edbf90309c8e9752ef…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:10:43 2011 -0500 dxdiagn/tests: Add tests for some DxDiag_DisplayDevices subcontainer properties. --- dlls/dxdiagn/tests/container.c | 155 +++++++++++++++++++++++++++++++++------ 1 files changed, 131 insertions(+), 24 deletions(-) diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index dff8701..9805b94 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -25,10 +25,17 @@ #include "oleauto.h" #include "wine/test.h" +struct property_test +{ + const WCHAR *prop; + VARTYPE vt; +}; + static IDxDiagProvider *pddp; static IDxDiagContainer *pddc; static const WCHAR DxDiag_SystemInfo[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','I','n','f','o',0}; +static const WCHAR DxDiag_DisplayDevices[] = {'D','x','D','i','a','g','_','D','i','s','p','l','a','y','D','e','v','i','c','e','s',0}; /* Based on debugstr_variant in dlls/jscript/jsutils.c. */ static const char *debugstr_variant(const VARIANT *var) @@ -703,7 +710,6 @@ cleanup: static void test_root_children(void) { - static const WCHAR DxDiag_DisplayDevices[] = {'D','x','D','i','a','g','_','D','i','s','p','l','a','y','D','e','v','i','c','e','s',0}; static const WCHAR DxDiag_DirectSound[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d',0}; static const WCHAR DxDiag_DirectMusic[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','M','u','s','i','c',0}; static const WCHAR DxDiag_DirectInput[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','I','n','p','u','t',0}; @@ -777,6 +783,45 @@ cleanup: IDxDiagProvider_Release(pddp); } +static void test_container_properties(IDxDiagContainer *container, const struct property_test *property_tests, size_t len) +{ + HRESULT hr; + + /* Check that the container has no properties if there are no properties to examine. */ + if (len == 0) + { + DWORD prop_count; + + hr = IDxDiagContainer_GetNumberOfProps(container, &prop_count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + if (hr == S_OK) + ok(prop_count == 0, "Expected container property count to be zero, got %u\n", prop_count); + } + else + { + VARIANT var; + int i; + + VariantInit(&var); + + /* Examine the variant types of obtained property values. */ + for (i = 0; i < len; i++) + { + hr = IDxDiagContainer_GetProp(container, property_tests[i].prop, &var); + ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08x\n", + i, wine_dbgstr_w(property_tests[i].prop), hr); + + if (hr == S_OK) + { + ok(V_VT(&var) == property_tests[i].vt, + "[%d] Expected variant type %d, got %d\n", i, property_tests[i].vt, V_VT(&var)); + trace("%s = %s\n", wine_dbgstr_w(property_tests[i].prop), debugstr_variant(&var)); + VariantClear(&var); + } + } + } +} + static void test_DxDiag_SystemInfo(void) { static const WCHAR dwOSMajorVersion[] = {'d','w','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0}; @@ -812,11 +857,7 @@ static void test_DxDiag_SystemInfo(void) static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0}; static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0}; - static const struct - { - const WCHAR *prop; - VARTYPE vt; - } property_tests[] = + static const struct property_test property_tests[] = { {dwOSMajorVersion, VT_UI4}, {dwOSMinorVersion, VT_UI4}, @@ -852,8 +893,8 @@ static void test_DxDiag_SystemInfo(void) {szOSExLongEnglish, VT_BSTR}, }; + IDxDiagContainer *container; HRESULT hr; - IDxDiagContainer *child = NULL; if (!create_root_IDxDiagContainer()) { @@ -861,33 +902,98 @@ static void test_DxDiag_SystemInfo(void) return; } - hr = IDxDiagContainer_GetChildContainer(pddc, DxDiag_SystemInfo, &child); + hr = IDxDiagContainer_GetChildContainer(pddc, DxDiag_SystemInfo, &container); ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); if (hr == S_OK) { - int i; - VARIANT var; + trace("Testing container DxDiag_SystemInfo\n"); + test_container_properties(container, property_tests, sizeof(property_tests)/sizeof(property_tests[0])); + IDxDiagContainer_Release(container); + } - VariantInit(&var); + IDxDiagContainer_Release(pddc); + IDxDiagProvider_Release(pddp); +} - /* Examine the variant types of obtained property values. */ - for (i = 0; i < sizeof(property_tests)/sizeof(property_tests[0]); i++) - { - hr = IDxDiagContainer_GetProp(child, property_tests[i].prop, &var); - ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", i, hr); +static void test_DxDiag_DisplayDevices(void) +{ + static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0}; + static const WCHAR szDeviceName[] = {'s','z','D','e','v','i','c','e','N','a','m','e',0}; + static const WCHAR szKeyDeviceID[] = {'s','z','K','e','y','D','e','v','i','c','e','I','D',0}; + static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0}; + static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0}; + static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0}; + static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0}; + static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0}; + static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0}; + static const WCHAR dwBpp[] = {'d','w','B','p','p',0}; + static const WCHAR szDisplayMemoryLocalized[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szDisplayMemoryEnglish[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; + + static const struct property_test property_tests[] = + { + {szDescription, VT_BSTR}, + {szDeviceName, VT_BSTR}, + {szKeyDeviceID, VT_BSTR}, + {szKeyDeviceKey, VT_BSTR}, + {szVendorId, VT_BSTR}, + {szDeviceId, VT_BSTR}, + {szDeviceIdentifier, VT_BSTR}, + {dwWidth, VT_UI4}, + {dwHeight, VT_UI4}, + {dwBpp, VT_UI4}, + {szDisplayMemoryLocalized, VT_BSTR}, + {szDisplayMemoryEnglish, VT_BSTR}, + }; - if (hr == S_OK) - { - ok(V_VT(&var) == property_tests[i].vt, - "[%d] Expected variant type %d, got %d\n", i, property_tests[i].vt, V_VT(&var)); - trace("%s = %s\n", wine_dbgstr_w(property_tests[i].prop), debugstr_variant(&var)); - VariantClear(&var); - } + IDxDiagContainer *display_cont = NULL; + DWORD count, i; + HRESULT hr; + + if (!create_root_IDxDiagContainer()) + { + skip("Unable to create the root IDxDiagContainer\n"); + return; + } + + hr = IDxDiagContainer_GetChildContainer(pddc, DxDiag_DisplayDevices, &display_cont); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + + if (hr != S_OK) + goto cleanup; + + hr = IDxDiagContainer_GetNumberOfProps(display_cont, &count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr); + if (hr == S_OK) + ok(count == 0, "Expected count to be 0, got %u\n", count); + + hr = IDxDiagContainer_GetNumberOfChildContainers(display_cont, &count); + ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr); + + if (hr != S_OK) + goto cleanup; + + for (i = 0; i < count; i++) + { + WCHAR child_container[256]; + IDxDiagContainer *child; + + hr = IDxDiagContainer_EnumChildContainerNames(display_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR)); + ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); + + hr = IDxDiagContainer_GetChildContainer(display_cont, child_container, &child); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + + if (hr == S_OK) + { + trace("Testing container %s\n", wine_dbgstr_w(child_container)); + test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0])); } } - IDxDiagContainer_Release(child); +cleanup: + if (display_cont) IDxDiagContainer_Release(display_cont); IDxDiagContainer_Release(pddc); IDxDiagProvider_Release(pddp); } @@ -905,5 +1011,6 @@ START_TEST(container) test_root_children(); test_DxDiag_SystemInfo(); + test_DxDiag_DisplayDevices(); CoUninitialize(); }
1
0
0
0
Andrew Nguyen : dxdiagn: Unconditionally initialize the passed variant in IDxDiagContainer::GetProp .
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 9d7d35c1eeffcf4529ebb4c77e431d0a187f1c16 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d7d35c1eeffcf4529ebb4c77…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Wed Jun 15 07:10:32 2011 -0500 dxdiagn: Unconditionally initialize the passed variant in IDxDiagContainer::GetProp. --- dlls/dxdiagn/container.c | 5 +---- dlls/dxdiagn/tests/container.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c index 96ba10a..6de641f 100644 --- a/dlls/dxdiagn/container.c +++ b/dlls/dxdiagn/container.c @@ -222,10 +222,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetProp(PDXDIAGCONTAINER iface, LPCWS LIST_FOR_EACH_ENTRY(p, &This->cont->properties, IDxDiagContainerImpl_Property, entry) { if (0 == lstrcmpW(p->propName, pwszPropName)) { - HRESULT hr = VariantClear(pvarProp); - if (hr == DISP_E_ARRAYISLOCKED || hr == DISP_E_BADVARTYPE) - VariantInit(pvarProp); - + VariantInit(pvarProp); return VariantCopy(pvarProp, &p->vProp); } } diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c index c7bd2bb..dff8701 100644 --- a/dlls/dxdiagn/tests/container.c +++ b/dlls/dxdiagn/tests/container.c @@ -568,6 +568,7 @@ static void test_GetProp(void) VARIANT var; SAFEARRAY *sa; SAFEARRAYBOUND bound; + ULONG ref; static const WCHAR emptyW[] = {0}; static const WCHAR testW[] = {'t','e','s','t',0}; @@ -680,8 +681,21 @@ static void test_GetProp(void) ok(hr == S_OK, "Expected SafeArrayUnlock to return S_OK, got 0x%08x\n", hr); hr = SafeArrayDestroy(sa); ok(hr == S_OK, "Expected SafeArrayDestroy to return S_OK, got 0x%08x\n", hr); - IDxDiagContainer_Release(child); + /* Determine whether GetProp calls VariantClear on the passed variant. */ + V_VT(&var) = VT_UNKNOWN; + V_UNKNOWN(&var) = (IUnknown *)child; + IDxDiagContainer_AddRef(child); + + hr = IDxDiagContainer_GetProp(child, property, &var); + ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr); + ok(V_VT(&var) != VT_UNKNOWN, "Expected the variant to be modified\n"); + + IDxDiagContainer_AddRef(child); + ref = IDxDiagContainer_Release(child); + ok(ref == 2, "Expected reference count to be 2, got %u\n", ref); + + IDxDiagContainer_Release(child); cleanup: IDxDiagContainer_Release(pddc); IDxDiagProvider_Release(pddp);
1
0
0
0
Francois Gouget : shell32: Fix ellipsis usage in the menu and button labels .
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: d54f4fc3c8fd6323d22c35ef05847b7e98b1e429 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d54f4fc3c8fd6323d22c35ef0…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 15 12:38:36 2011 +0200 shell32: Fix ellipsis usage in the menu and button labels. --- dlls/shell32/shell32.rc | 2 +- dlls/shell32/shell32_Bg.rc | 2 +- dlls/shell32/shell32_Ca.rc | 2 +- dlls/shell32/shell32_Cs.rc | 2 +- dlls/shell32/shell32_En.rc | 2 +- dlls/shell32/shell32_Eo.rc | 2 +- dlls/shell32/shell32_Sk.rc | 2 +- dlls/shell32/shell32_Tr.rc | 2 +- dlls/shell32/shell32_Wa.rc | 2 +- po/ar.po | 2 +- po/bg.po | 3 ++- po/ca.po | 2 +- po/cs.po | 3 ++- po/da.po | 3 ++- po/de.po | 3 ++- po/el.po | 2 +- po/en.po | 4 ++-- po/en_US.po | 4 ++-- po/eo.po | 3 ++- po/es.po | 3 ++- po/fa.po | 2 +- po/fi.po | 3 ++- po/fr.po | 3 ++- po/he.po | 3 ++- po/hi.po | 2 +- po/hu.po | 3 ++- po/it.po | 3 ++- po/ja.po | 3 ++- po/ko.po | 3 ++- po/lt.po | 3 ++- po/ml.po | 2 +- po/nb_NO.po | 3 ++- po/nl.po | 3 ++- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 3 ++- po/pt_BR.po | 3 ++- po/pt_PT.po | 3 ++- po/rm.po | 2 +- po/ro.po | 3 ++- po/ru.po | 3 ++- po/sk.po | 3 ++- po/sl.po | 3 ++- po/sr_RS(a)cyrillic.po | 3 ++- po/sr_RS(a)latin.po | 3 ++- po/sv.po | 3 ++- po/te.po | 2 +- po/th.po | 2 +- po/tr.po | 3 ++- po/uk.po | 3 ++- po/wa.po | 3 ++- po/wine.pot | 2 +- po/zh_CN.po | 3 ++- po/zh_TW.po | 3 ++- 54 files changed, 87 insertions(+), 56 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d54f4fc3c8fd6323d22c3…
1
0
0
0
Francois Gouget : cmdlgtst: Fix ellipsis usage in the menu and button labels.
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 210853eeb42245094ee5d908154ba35c0bc86ca6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=210853eeb42245094ee5d9081…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 15 12:44:36 2011 +0200 cmdlgtst: Fix ellipsis usage in the menu and button labels. --- programs/cmdlgtst/En.rc | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/programs/cmdlgtst/En.rc b/programs/cmdlgtst/En.rc index 71eae6d..89adb41 100644 --- a/programs/cmdlgtst/En.rc +++ b/programs/cmdlgtst/En.rc @@ -32,30 +32,30 @@ CmdlgtstMenu MENU POPUP "&Commdlg" { - MENUITEM "&Open", CM_U_OPEN - MENUITEM "&Save", CM_U_SAVE + MENUITEM "&Open...", CM_U_OPEN + MENUITEM "&Save As...", CM_U_SAVE MENUITEM SEPARATOR - MENUITEM "&Color", CM_U_COLOR - MENUITEM "&Font", CM_U_FONT + MENUITEM "&Color...", CM_U_COLOR + MENUITEM "&Font...", CM_U_FONT MENUITEM SEPARATOR - MENUITEM "Find &Text", CM_U_FIND - MENUITEM "&Replace Text", CM_U_REPLACE + MENUITEM "Find &Text...", CM_U_FIND + MENUITEM "&Replace Text...", CM_U_REPLACE MENUITEM SEPARATOR - MENUITEM "P&rint", CM_U_PRINT - MENUITEM "Pa&ge Setup", CM_U_PAGESETUP + MENUITEM "P&rint...", CM_U_PRINT + MENUITEM "Pa&ge Setup...", CM_U_PAGESETUP } POPUP "F&lags" { - MENUITEM "Fil&e", CM_F_FILE + MENUITEM "Fil&e...", CM_F_FILE MENUITEM SEPARATOR - MENUITEM "&Color", CM_F_COLOR - MENUITEM "&Font", CM_F_FONT + MENUITEM "&Color...", CM_F_COLOR + MENUITEM "&Font...", CM_F_FONT MENUITEM SEPARATOR - MENUITEM "Find/&Replace", CM_F_FINDREPLACE + MENUITEM "Find/&Replace...", CM_F_FINDREPLACE MENUITEM SEPARATOR - MENUITEM "P&rint", CM_F_PRINT - MENUITEM "Pa&ge Setup", CM_F_PAGESETUP + MENUITEM "P&rint....", CM_F_PRINT + MENUITEM "Pa&ge Setup...", CM_F_PAGESETUP } POPUP "&Help"
1
0
0
0
Francois Gouget : msvfw32: Fix ellipsis usage in the menu and button labels .
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 11529e1c9f9ac9c31a0058819b597d9d4289e226 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11529e1c9f9ac9c31a0058819…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 15 12:37:21 2011 +0200 msvfw32: Fix ellipsis usage in the menu and button labels. --- dlls/msvfw32/msvfw32_En.rc | 2 +- dlls/msvfw32/msvfw32_Hu.rc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvfw32/msvfw32_En.rc b/dlls/msvfw32/msvfw32_En.rc index 527f4a6..88c55d1 100644 --- a/dlls/msvfw32/msvfw32_En.rc +++ b/dlls/msvfw32/msvfw32_En.rc @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg" COMBOBOX IDC_COMP_LIST,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP PUSHBUTTON "Con&figure...",IDC_CONFIGURE,129,36,49,14 - PUSHBUTTON "&About...",IDC_ABOUT,129,52,49,14 + PUSHBUTTON "&About",IDC_ABOUT,129,52,49,14 SCROLLBAR IDC_QUALITY_SCROLL,9,44,111,9,WS_TABSTOP diff --git a/dlls/msvfw32/msvfw32_Hu.rc b/dlls/msvfw32/msvfw32_Hu.rc index e910f93..244aa7b 100644 --- a/dlls/msvfw32/msvfw32_Hu.rc +++ b/dlls/msvfw32/msvfw32_Hu.rc @@ -32,7 +32,7 @@ FONT 8, "MS Shell Dlg" COMBOBOX IDC_COMP_LIST,9,16,111,67,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP PUSHBUTTON "Be�ll�&t�s...",IDC_CONFIGURE,129,36,49,14 - PUSHBUTTON "&About...",IDC_ABOUT,129,52,49,14 + PUSHBUTTON "&About",IDC_ABOUT,129,52,49,14 SCROLLBAR IDC_QUALITY_SCROLL,9,44,111,9,WS_TABSTOP
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
81
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
Results per page:
10
25
50
100
200