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 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
674 discussions
Start a n
N
ew thread
Vitaliy Margolen : dinput: Return correct error code for DIPROP_VIDPID.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 4979d287b29a90b8fc590537fef146e4f726899e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4979d287b29a90b8fc590537f…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Feb 1 20:28:00 2011 -0700 dinput: Return correct error code for DIPROP_VIDPID. --- dlls/dinput/device.c | 3 +++ include/dinput.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 44c99dd..397e70e 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -906,6 +906,9 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, TRACE("buffersize = %d\n", pd->dwData); break; } + case (DWORD_PTR) DIPROP_VIDPID: + FIXME("DIPROP_VIDPID not implemented\n"); + return DIERR_UNSUPPORTED; default: FIXME("Unknown property %s\n", debugstr_guid(rguid)); return DIERR_INVALIDPARAM; diff --git a/include/dinput.h b/include/dinput.h index 36b385f..ac3aaba 100644 --- a/include/dinput.h +++ b/include/dinput.h @@ -764,6 +764,7 @@ typedef const DIPROPSTRING *LPCDIPROPSTRING; #define DIPROP_CALIBRATION MAKEDIPROP(11) #define DIPROP_GUIDANDPATH MAKEDIPROP(12) #define DIPROP_KEYNAME MAKEDIPROP(20) +#define DIPROP_VIDPID MAKEDIPROP(24) typedef struct DIDEVCAPS_DX3 { DWORD dwSize;
1
0
0
0
Henri Verbeet : winex11.drv: Only query for XShm on first use.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: b44bdfd20a4d025483d1bd5bdbfa1f7b829055f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b44bdfd20a4d025483d1bd5bd…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Tue Feb 1 20:47:22 2011 +0100 winex11.drv: Only query for XShm on first use. --- dlls/winex11.drv/dib.c | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 05bd30c..c7758e6 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -4728,6 +4728,24 @@ static XImage *X11DRV_XShmCreateImage( int width, int height, int bpp, } #endif /* HAVE_LIBXXSHM */ +static Bool X11DRV_DIB_QueryXShm( Bool *pixmaps ) +{ + static Bool have_xshm, have_xshm_pixmaps; + static BOOL initialized; + + if (!initialized) + { +#ifdef HAVE_LIBXXSHM + int major, minor; + + have_xshm = XShmQueryVersion( gdi_display, &major, &minor, &have_xshm_pixmaps ); +#endif + initialized = TRUE; + } + + *pixmaps = have_xshm_pixmaps; + return have_xshm; +} /*********************************************************************** * X11DRV_CreateDIBSection (X11DRV.@) @@ -4740,7 +4758,6 @@ HBITMAP CDECL X11DRV_CreateDIBSection( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, WORD bpp, compr; LONG w, h; #ifdef HAVE_LIBXXSHM - int major, minor; Bool pixmaps; #endif @@ -4780,7 +4797,7 @@ HBITMAP CDECL X11DRV_CreateDIBSection( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, #ifdef HAVE_LIBXXSHM physBitmap->shminfo.shmid = -1; - if (XShmQueryVersion( gdi_display, &major, &minor, &pixmaps ) + if (X11DRV_DIB_QueryXShm( &pixmaps ) && (physBitmap->image = X11DRV_XShmCreateImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight, physBitmap->pixmap_depth, &physBitmap->shminfo ))) {
1
0
0
0
Henri Verbeet : wined3d: Check if formats are supported as render target in srgbwrite_format_test() .
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 82a4373cd0b5df7be59c4c318cb3a7d57571ba3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82a4373cd0b5df7be59c4c318…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Tue Feb 1 20:47:21 2011 +0100 wined3d: Check if formats are supported as render target in srgbwrite_format_test(). Floating point formats in particular may not be supported everywhere. --- dlls/d3d9/tests/visual.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index f615369..ca33fae 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11447,14 +11447,17 @@ static void srgbwrite_format_test(IDirect3DDevice9 *device) for(i = 0; i < (sizeof(formats) / sizeof(*formats)); i++) { - hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, D3DUSAGE_RENDERTARGET, formats[i].fmt, - D3DPOOL_DEFAULT, &texture, NULL); - ok(SUCCEEDED(hr), "CreateTexture failed, hr %#x.\n", hr); - if(FAILED(hr)) + if (FAILED(IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, + D3DUSAGE_RENDERTARGET, D3DRTYPE_TEXTURE, formats[i].fmt))) { - trace("Tex create failed\n"); + skip("Format %s not supported as render target, skipping test.\n", + formats[i].name); continue; } + + hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, D3DUSAGE_RENDERTARGET, formats[i].fmt, + D3DPOOL_DEFAULT, &texture, NULL); + ok(SUCCEEDED(hr), "CreateTexture failed, hr %#x.\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0f, 0); ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr);
1
0
0
0
Juan Lang : crypt32: Fix string quoting in CertRDNValueToStrA/ W and CertNameToStrA/W.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 74cf35d2ab55a0972f7e34edc76d69306f78d4a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74cf35d2ab55a0972f7e34edc…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Feb 1 10:05:05 2011 -0800 crypt32: Fix string quoting in CertRDNValueToStrA/W and CertNameToStrA/W. Based on an idea of Christian Inci's. --- dlls/crypt32/str.c | 139 ++++++++++++++++++++++++++++++++++++++++++++-- dlls/crypt32/tests/str.c | 20 +++--- 2 files changed, 143 insertions(+), 16 deletions(-) diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c index 81e9ec3..ae90eb0 100644 --- a/dlls/crypt32/str.c +++ b/dlls/crypt32/str.c @@ -29,6 +29,133 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); +DWORD WINAPI CertRDNValueToStrA(DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, + LPSTR psz, DWORD csz) +{ + DWORD ret = 0, len; + + TRACE("(%d, %p, %p, %d)\n", dwValueType, pValue, psz, csz); + + switch (dwValueType) + { + case CERT_RDN_ANY_TYPE: + break; + case CERT_RDN_NUMERIC_STRING: + case CERT_RDN_PRINTABLE_STRING: + case CERT_RDN_TELETEX_STRING: + case CERT_RDN_VIDEOTEX_STRING: + case CERT_RDN_IA5_STRING: + case CERT_RDN_GRAPHIC_STRING: + case CERT_RDN_VISIBLE_STRING: + case CERT_RDN_GENERAL_STRING: + len = pValue->cbData; + if (!psz || !csz) + ret = len; + else + { + DWORD chars = min(len, csz - 1); + + if (chars) + { + memcpy(psz, pValue->pbData, chars); + ret += chars; + csz -= chars; + } + } + break; + case CERT_RDN_BMP_STRING: + case CERT_RDN_UTF8_STRING: + len = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)pValue->pbData, + pValue->cbData / sizeof(WCHAR), NULL, 0, NULL, NULL); + if (!psz || !csz) + ret = len; + else + { + DWORD chars = min(pValue->cbData / sizeof(WCHAR), csz - 1); + + if (chars) + { + ret = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)pValue->pbData, + chars, psz, csz - 1, NULL, NULL); + csz -= ret; + } + } + break; + default: + FIXME("string type %d unimplemented\n", dwValueType); + } + if (psz && csz) + { + *(psz + ret) = '\0'; + csz--; + ret++; + } + else + ret++; + TRACE("returning %d (%s)\n", ret, debugstr_a(psz)); + return ret; +} + +DWORD WINAPI CertRDNValueToStrW(DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, + LPWSTR psz, DWORD csz) +{ + DWORD ret = 0, len, i, strLen; + + TRACE("(%d, %p, %p, %d)\n", dwValueType, pValue, psz, csz); + + switch (dwValueType) + { + case CERT_RDN_ANY_TYPE: + break; + case CERT_RDN_NUMERIC_STRING: + case CERT_RDN_PRINTABLE_STRING: + case CERT_RDN_TELETEX_STRING: + case CERT_RDN_VIDEOTEX_STRING: + case CERT_RDN_IA5_STRING: + case CERT_RDN_GRAPHIC_STRING: + case CERT_RDN_VISIBLE_STRING: + case CERT_RDN_GENERAL_STRING: + len = pValue->cbData; + if (!psz || !csz) + ret = len; + else + { + WCHAR *ptr = psz; + + for (i = 0; i < pValue->cbData && ptr - psz < csz; ptr++, i++) + *ptr = pValue->pbData[i]; + ret = ptr - psz; + } + break; + case CERT_RDN_BMP_STRING: + case CERT_RDN_UTF8_STRING: + strLen = len = pValue->cbData / sizeof(WCHAR); + if (!psz || !csz) + ret = len; + else + { + WCHAR *ptr = psz; + + for (i = 0; i < strLen && ptr - psz < csz; ptr++, i++) + *ptr = ((LPCWSTR)pValue->pbData)[i]; + ret = ptr - psz; + } + break; + default: + FIXME("string type %d unimplemented\n", dwValueType); + } + if (psz && csz) + { + *(psz + ret) = '\0'; + csz--; + ret++; + } + else + ret++; + TRACE("returning %d (%s)\n", ret, debugstr_w(psz)); + return ret; +} + static inline BOOL is_quotable_char(char c) { switch(c) @@ -48,8 +175,8 @@ static inline BOOL is_quotable_char(char c) } } -DWORD WINAPI CertRDNValueToStrA(DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, - LPSTR psz, DWORD csz) +static DWORD quote_rdn_value_to_str_a(DWORD dwValueType, + PCERT_RDN_VALUE_BLOB pValue, LPSTR psz, DWORD csz) { DWORD ret = 0, len, i; BOOL needsQuotes = FALSE; @@ -157,8 +284,8 @@ DWORD WINAPI CertRDNValueToStrA(DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, return ret; } -DWORD WINAPI CertRDNValueToStrW(DWORD dwValueType, PCERT_RDN_VALUE_BLOB pValue, - LPWSTR psz, DWORD csz) +static DWORD quote_rdn_value_to_str_w(DWORD dwValueType, + PCERT_RDN_VALUE_BLOB pValue, LPWSTR psz, DWORD csz) { DWORD ret = 0, len, i, strLen; BOOL needsQuotes = FALSE; @@ -358,7 +485,7 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; } - chars = CertRDNValueToStrA( + chars = quote_rdn_value_to_str_a( rdn->rgRDNAttr[j].dwValueType, &rdn->rgRDNAttr[j].Value, psz ? psz + ret : NULL, psz ? csz - ret : 0); @@ -537,7 +664,7 @@ DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indentLevel, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; } - chars = CertRDNValueToStrW( + chars = quote_rdn_value_to_str_w( rdn->rgRDNAttr[j].dwValueType, &rdn->rgRDNAttr[j].Value, psz ? psz + ret : NULL, psz ? csz - ret : 0); diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c index 0285ab8..1846ec6 100644 --- a/dlls/crypt32/tests/str.c +++ b/dlls/crypt32/tests/str.c @@ -227,17 +227,17 @@ static void test_CertRDNValueToStrA(void) { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING, { sizeof(bin7), bin7 }, "aric(a)codeweavers.com", FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin9), bin9 }, "abc\"def", TRUE }, + { sizeof(bin9), bin9 }, "abc\"def", FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, { sizeof(bin10), bin10 }, "abc'def", FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin11), bin11 }, "abc, def", TRUE }, + { sizeof(bin11), bin11 }, "abc, def", FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin12), bin12 }, " abc ", TRUE }, + { sizeof(bin12), bin12 }, " abc ", FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin13), bin13 }, "\"def\"", TRUE }, + { sizeof(bin13), bin13 }, "\"def\"", FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin14), bin14 }, "1;3", TRUE }, + { sizeof(bin14), bin14 }, "1;3", FALSE }, }; DWORD i, ret; char buffer[2000]; @@ -328,17 +328,17 @@ static void test_CertRDNValueToStrW(void) { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING, { sizeof(bin7), bin7 }, aricW, FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin9), bin9 }, embeddedDoubleQuoteW, TRUE }, + { sizeof(bin9), bin9 }, embeddedDoubleQuoteW, FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, { sizeof(bin10), bin10 }, embeddedSingleQuoteW, FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin11), bin11 }, embeddedCommaW, TRUE }, + { sizeof(bin11), bin11 }, embeddedCommaW, FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin12), bin12 }, trailingAndEndingSpaceW, TRUE }, + { sizeof(bin12), bin12 }, trailingAndEndingSpaceW, FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin13), bin13 }, enclosingQuotesW, TRUE }, + { sizeof(bin13), bin13 }, enclosingQuotesW, FALSE }, { "0", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin14), bin14 }, embeddedSemiW, TRUE }, + { sizeof(bin14), bin14 }, embeddedSemiW, FALSE }, }; DWORD i, ret; WCHAR buffer[2000];
1
0
0
0
Juan Lang : crypt32/tests: Test CertNameToStr' s quoting behavior with CERT_SIMPLE_NAME_STR.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 307e247f21c882f1ad103bb51344f844645c61ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=307e247f21c882f1ad103bb51…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Feb 1 09:12:10 2011 -0800 crypt32/tests: Test CertNameToStr's quoting behavior with CERT_SIMPLE_NAME_STR. --- dlls/crypt32/tests/str.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c index 95a457c..0285ab8 100644 --- a/dlls/crypt32/tests/str.c +++ b/dlls/crypt32/tests/str.c @@ -523,37 +523,49 @@ static void test_CertNameToStrA(void) blob.pbData = encodedSingleQuotedCN; blob.cbData = sizeof(encodedSingleQuotedCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN='1'", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "'1'", FALSE); blob.pbData = encodedSpacedCN; blob.cbData = sizeof(encodedSpacedCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\" 1 \"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\" 1 \"", FALSE); blob.pbData = encodedQuotedCN; blob.cbData = sizeof(encodedQuotedCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"\"\"1\"\"\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"\"\"1\"\"\"", + FALSE); blob.pbData = encodedMultipleAttrCN; blob.cbData = sizeof(encodedMultipleAttrCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"1+2\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"1+2\"", FALSE); blob.pbData = encodedCommaCN; blob.cbData = sizeof(encodedCommaCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"a,b\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"a,b\"", FALSE); blob.pbData = encodedEqualCN; blob.cbData = sizeof(encodedEqualCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"a=b\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"a=b\"", FALSE); blob.pbData = encodedLessThanCN; blob.cbData = sizeof(encodedLessThanCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"<\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"<\"", FALSE); blob.pbData = encodedGreaterThanCN; blob.cbData = sizeof(encodedGreaterThanCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\">\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\">\"", FALSE); blob.pbData = encodedHashCN; blob.cbData = sizeof(encodedHashCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"#\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"#\"", FALSE); blob.pbData = encodedSemiCN; blob.cbData = sizeof(encodedSemiCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\";\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\";\"", FALSE); blob.pbData = encodedNewlineCN; blob.cbData = sizeof(encodedNewlineCN); test_NameToStrConversionA(&blob, CERT_X500_NAME_STR, "CN=\"a\nb\"", FALSE); + test_NameToStrConversionA(&blob, CERT_SIMPLE_NAME_STR, "\"a\nb\"", FALSE); } static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType, @@ -587,16 +599,27 @@ static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType, static const WCHAR simpleCN_W[] = { 'C','N','=','1',0 }; static const WCHAR singledQuotedCN_W[] = { 'C','N','=','\'','1','\'',0 }; +static const WCHAR simpleSingleQuotedCN_W[] = { '\'','1','\'',0 }; static const WCHAR spacedCN_W[] = { 'C','N','=','"',' ','1',' ','"',0 }; +static const WCHAR simpleSpacedCN_W[] = { '"',' ','1',' ','"',0 }; static const WCHAR quotedCN_W[] = { 'C','N','=','"','"','"','1','"','"','"',0 }; +static const WCHAR simpleQuotedCN_W[] = { '"','"','"','1','"','"','"',0 }; static const WCHAR multipleAttrCN_W[] = { 'C','N','=','"','1','+','2','"',0 }; +static const WCHAR simpleMultipleAttrCN_W[] = { '"','1','+','2','"',0 }; static const WCHAR commaCN_W[] = { 'C','N','=','"','a',',','b','"',0 }; +static const WCHAR simpleCommaCN_W[] = { '"','a',',','b','"',0 }; static const WCHAR equalCN_W[] = { 'C','N','=','"','a','=','b','"',0 }; +static const WCHAR simpleEqualCN_W[] = { '"','a','=','b','"',0 }; static const WCHAR lessThanCN_W[] = { 'C','N','=','"','<','"',0 }; +static const WCHAR simpleLessThanCN_W[] = { '"','<','"',0 }; static const WCHAR greaterThanCN_W[] = { 'C','N','=','"','>','"',0 }; +static const WCHAR simpleGreaterThanCN_W[] = { '"','>','"',0 }; static const WCHAR hashCN_W[] = { 'C','N','=','"','#','"',0 }; +static const WCHAR simpleHashCN_W[] = { '"','#','"',0 }; static const WCHAR semiCN_W[] = { 'C','N','=','"',';','"',0 }; +static const WCHAR simpleSemiCN_W[] = { '"',';','"',0 }; static const WCHAR newlineCN_W[] = { 'C','N','=','"','a','\n','b','"',0 }; +static const WCHAR simpleNewlineCN_W[] = { '"','a','\n','b','"',0 }; static void test_CertNameToStrW(void) { @@ -662,39 +685,61 @@ static void test_CertNameToStrW(void) blob.cbData = sizeof(encodedSingleQuotedCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, singledQuotedCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, + simpleSingleQuotedCN_W, FALSE); blob.pbData = encodedSpacedCN; blob.cbData = sizeof(encodedSpacedCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, spacedCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleSpacedCN_W, + FALSE); blob.pbData = encodedQuotedCN; blob.cbData = sizeof(encodedQuotedCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, quotedCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleQuotedCN_W, + FALSE); blob.pbData = encodedMultipleAttrCN; blob.cbData = sizeof(encodedMultipleAttrCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, multipleAttrCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, + simpleMultipleAttrCN_W, FALSE); blob.pbData = encodedCommaCN; blob.cbData = sizeof(encodedCommaCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, commaCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleCommaCN_W, + FALSE); blob.pbData = encodedEqualCN; blob.cbData = sizeof(encodedEqualCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, equalCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleEqualCN_W, + FALSE); blob.pbData = encodedLessThanCN; blob.cbData = sizeof(encodedLessThanCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, lessThanCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleLessThanCN_W, + FALSE); blob.pbData = encodedGreaterThanCN; blob.cbData = sizeof(encodedGreaterThanCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, greaterThanCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, + simpleGreaterThanCN_W, FALSE); blob.pbData = encodedHashCN; blob.cbData = sizeof(encodedHashCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, hashCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleHashCN_W, + FALSE); blob.pbData = encodedSemiCN; blob.cbData = sizeof(encodedSemiCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, semiCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleSemiCN_W, + FALSE); blob.pbData = encodedNewlineCN; blob.cbData = sizeof(encodedNewlineCN); test_NameToStrConversionW(&blob, CERT_X500_NAME_STR, newlineCN_W, FALSE); + test_NameToStrConversionW(&blob, CERT_SIMPLE_NAME_STR, simpleNewlineCN_W, + FALSE); } struct StrToNameA
1
0
0
0
Juan Lang : crypt32/tests: Add tests that show that CertRDNValueToStr doesn 't quote (based on a patch by Christian Inci).
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 5bf4aec163d11f932e528713c0e18122fb8c6351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bf4aec163d11f932e528713c…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Jan 19 14:52:11 2011 -0800 crypt32/tests: Add tests that show that CertRDNValueToStr doesn't quote (based on a patch by Christian Inci). --- dlls/crypt32/tests/str.c | 108 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 86 insertions(+), 22 deletions(-) diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c index 8dbc60f..95a457c 100644 --- a/dlls/crypt32/tests/str.c +++ b/dlls/crypt32/tests/str.c @@ -31,6 +31,7 @@ typedef struct _CertRDNAttrEncoding { DWORD dwValueType; CERT_RDN_VALUE_BLOB Value; LPCSTR str; + BOOL todo; } CertRDNAttrEncoding, *PCertRDNAttrEncoding; typedef struct _CertRDNAttrEncodingW { @@ -38,6 +39,7 @@ typedef struct _CertRDNAttrEncodingW { DWORD dwValueType; CERT_RDN_VALUE_BLOB Value; LPCWSTR str; + BOOL todo; } CertRDNAttrEncodingW, *PCertRDNAttrEncodingW; static BYTE bin1[] = { 0x55, 0x53 }; @@ -59,6 +61,12 @@ static BYTE bin8[] = { 0x66,0x00,0x69,0x00,0x63,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6f,0x00,0x6e, 0x00,0x20,0x00,0x41,0x00,0x75,0x00,0x74,0x00,0x68,0x00,0x6f,0x00,0x72,0x00, 0x69,0x00,0x74,0x00,0x79,0x00 }; +static BYTE bin9[] = { 0x61, 0x62, 0x63, 0x22, 0x64, 0x65, 0x66 }; +static BYTE bin10[] = { 0x61, 0x62, 0x63, 0x27, 0x64, 0x65, 0x66 }; +static BYTE bin11[] = { 0x61, 0x62, 0x63, 0x2c, 0x20, 0x64, 0x65, 0x66 }; +static BYTE bin12[] = { 0x20, 0x61, 0x62, 0x63, 0x20 }; +static BYTE bin13[] = { 0x22, 0x64, 0x65, 0x66, 0x22 }; +static BYTE bin14[] = { 0x31, 0x3b, 0x33 }; static const BYTE cert[] = {0x30,0x82,0x2,0xbb,0x30,0x82,0x2,0x24,0x2,0x9,0x0,0xe3,0x5a,0x10,0xf1,0xfc, @@ -205,19 +213,31 @@ static void test_CertRDNValueToStrA(void) { CertRDNAttrEncoding attrs[] = { { "2.5.4.6", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin1), bin1 }, "US" }, + { sizeof(bin1), bin1 }, "US", FALSE }, { "2.5.4.8", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin2), bin2 }, "Minnesota" }, + { sizeof(bin2), bin2 }, "Minnesota", FALSE }, { "2.5.4.7", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin3), bin3 }, "Minneapolis" }, + { sizeof(bin3), bin3 }, "Minneapolis", FALSE }, { "2.5.4.10", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin4), bin4 }, "CodeWeavers" }, + { sizeof(bin4), bin4 }, "CodeWeavers", FALSE }, { "2.5.4.11", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin5), bin5 }, "Wine Development" }, + { sizeof(bin5), bin5 }, "Wine Development", FALSE }, { "2.5.4.3", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin6), bin6 }, "localhost" }, + { sizeof(bin6), bin6 }, "localhost", FALSE }, { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING, - { sizeof(bin7), bin7 }, "aric(a)codeweavers.com" }, + { sizeof(bin7), bin7 }, "aric(a)codeweavers.com", FALSE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin9), bin9 }, "abc\"def", TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin10), bin10 }, "abc'def", FALSE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin11), bin11 }, "abc, def", TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin12), bin12 }, " abc ", TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin13), bin13 }, "\"def\"", TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin14), bin14 }, "1;3", TRUE }, }; DWORD i, ret; char buffer[2000]; @@ -241,10 +261,22 @@ static void test_CertRDNValueToStrA(void) { ret = pCertRDNValueToStrA(attrs[i].dwValueType, &attrs[i].Value, buffer, sizeof(buffer)); - ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %d\n", - lstrlenA(attrs[i].str) + 1, ret); - ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n", attrs[i].str, - buffer); + if (attrs[i].todo) + { + todo_wine + ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %d\n", + lstrlenA(attrs[i].str) + 1, ret); + todo_wine + ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n", + attrs[i].str, buffer); + } + else + { + ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %d\n", + lstrlenA(attrs[i].str) + 1, ret); + ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n", + attrs[i].str, buffer); + } } blob.pbData = bin8; blob.cbData = sizeof(bin8); @@ -272,21 +304,41 @@ static void test_CertRDNValueToStrW(void) static const WCHAR ePKIW[] = { 'e','P','K','I',' ','R','o','o','t',' ', 'C','e','r','t','i','f','i','c','a','t','i','o','n',' ','A','u','t','h', 'o','r','i','t','y',0 }; + static const WCHAR embeddedDoubleQuoteW[] = { 'a','b','c','"','d','e','f', + 0 }; + static const WCHAR embeddedSingleQuoteW[] = { 'a','b','c','\'','d','e','f', + 0 }; + static const WCHAR embeddedCommaW[] = { 'a','b','c',',',' ','d','e','f',0 }; + static const WCHAR trailingAndEndingSpaceW[] = { ' ','a','b','c',' ',0 }; + static const WCHAR enclosingQuotesW[] = { '"','d','e','f','"',0 }; + static const WCHAR embeddedSemiW[] = { '1',';','3',0 }; CertRDNAttrEncodingW attrs[] = { { "2.5.4.6", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin1), bin1 }, usW }, + { sizeof(bin1), bin1 }, usW, FALSE }, { "2.5.4.8", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin2), bin2 }, minnesotaW }, + { sizeof(bin2), bin2 }, minnesotaW, FALSE }, { "2.5.4.7", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin3), bin3 }, minneapolisW }, + { sizeof(bin3), bin3 }, minneapolisW, FALSE }, { "2.5.4.10", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin4), bin4 }, codeweaversW }, + { sizeof(bin4), bin4 }, codeweaversW, FALSE }, { "2.5.4.11", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin5), bin5 }, wineDevW }, + { sizeof(bin5), bin5 }, wineDevW, FALSE }, { "2.5.4.3", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin6), bin6 }, localhostW }, + { sizeof(bin6), bin6 }, localhostW, FALSE }, { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING, - { sizeof(bin7), bin7 }, aricW }, + { sizeof(bin7), bin7 }, aricW, FALSE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin9), bin9 }, embeddedDoubleQuoteW, TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin10), bin10 }, embeddedSingleQuoteW, FALSE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin11), bin11 }, embeddedCommaW, TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin12), bin12 }, trailingAndEndingSpaceW, TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin13), bin13 }, enclosingQuotesW, TRUE }, + { "0", CERT_RDN_PRINTABLE_STRING, + { sizeof(bin14), bin14 }, embeddedSemiW, TRUE }, }; DWORD i, ret; WCHAR buffer[2000]; @@ -314,10 +366,22 @@ static void test_CertRDNValueToStrW(void) { ret = pCertRDNValueToStrW(attrs[i].dwValueType, &attrs[i].Value, buffer, sizeof(buffer) / sizeof(buffer[0])); - ok(ret == lstrlenW(attrs[i].str) + 1, "Expected length %d, got %d\n", - lstrlenW(attrs[i].str) + 1, ret); - ok(!lstrcmpW(buffer, attrs[i].str), "Expected %s, got %s\n", - wine_dbgstr_w(attrs[i].str), wine_dbgstr_w(buffer)); + if (attrs[i].todo) + { + todo_wine + ok(ret == lstrlenW(attrs[i].str) + 1, + "Expected length %d, got %d\n", lstrlenW(attrs[i].str) + 1, ret); + todo_wine + ok(!lstrcmpW(buffer, attrs[i].str), "Expected %s, got %s\n", + wine_dbgstr_w(attrs[i].str), wine_dbgstr_w(buffer)); + } + else + { + ok(ret == lstrlenW(attrs[i].str) + 1, + "Expected length %d, got %d\n", lstrlenW(attrs[i].str) + 1, ret); + ok(!lstrcmpW(buffer, attrs[i].str), "Expected %s, got %s\n", + wine_dbgstr_w(attrs[i].str), wine_dbgstr_w(buffer)); + } } blob.pbData = bin8; blob.cbData = sizeof(bin8);
1
0
0
0
Henri Verbeet : wined3d: Get rid of the IWineD3D typedefs.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 074977d404566932b1995249f3c08ac5c6bf8122 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=074977d404566932b1995249f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Feb 1 19:39:54 2011 +0100 wined3d: Get rid of the IWineD3D typedefs. --- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/directx.c | 39 +++++++++++++++++++-------------------- dlls/wined3d/resource.c | 2 +- dlls/wined3d/surface.c | 2 +- dlls/wined3d/wined3d_main.c | 4 ++-- dlls/wined3d/wined3d_private.h | 8 +++----- 6 files changed, 28 insertions(+), 31 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 381cd46..a63959a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6928,7 +6928,7 @@ static const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl = IWineD3DDeviceImpl_RestoreFullscreenWindow, }; -HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, +HRESULT device_init(IWineD3DDeviceImpl *device, struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, IWineD3DDeviceParent *device_parent) { @@ -6942,7 +6942,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, device->lpVtbl = &IWineD3DDevice_Vtbl; device->ref = 1; - device->wined3d = (IWineD3D *)wined3d; + device->wined3d = wined3d; wined3d_incref(device->wined3d); device->adapter = wined3d->adapter_count ? adapter : NULL; device->device_parent = device_parent; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 68edd41..899011e 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -4983,7 +4983,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info) } /* Do not call while under the GL lock. */ -static BOOL InitAdapters(IWineD3DImpl *This) +static BOOL InitAdapters(struct wined3d *wined3d) { static HMODULE mod_gl; BOOL ret; @@ -5040,7 +5040,7 @@ static BOOL InitAdapters(IWineD3DImpl *This) /* For now only one default adapter */ { - struct wined3d_adapter *adapter = &This->adapters[0]; + struct wined3d_adapter *adapter = &wined3d->adapters[0]; const struct wined3d_gl_info *gl_info = &adapter->gl_info; struct wined3d_fake_gl_ctx fake_gl_ctx = {0}; int iPixelFormat; @@ -5246,30 +5246,29 @@ static BOOL InitAdapters(IWineD3DImpl *This) fillGLAttribFuncs(&adapter->gl_info); adapter->opengl = TRUE; } - This->adapter_count = 1; - TRACE("%u adapters successfully initialized\n", This->adapter_count); + wined3d->adapter_count = 1; + TRACE("%u adapters successfully initialized.\n", wined3d->adapter_count); return TRUE; nogl_adapter: /* Initialize an adapter for ddraw-only memory counting */ - memset(This->adapters, 0, sizeof(This->adapters)); - This->adapters[0].ordinal = 0; - This->adapters[0].opengl = FALSE; - This->adapters[0].monitorPoint.x = -1; - This->adapters[0].monitorPoint.y = -1; - - This->adapters[0].driver_info.name = "Display"; - This->adapters[0].driver_info.description = "WineD3D DirectDraw Emulation"; - if(wined3d_settings.emulated_textureram) { - This->adapters[0].TextureRam = wined3d_settings.emulated_textureram; - } else { - This->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */ - } + memset(wined3d->adapters, 0, sizeof(wined3d->adapters)); + wined3d->adapters[0].ordinal = 0; + wined3d->adapters[0].opengl = FALSE; + wined3d->adapters[0].monitorPoint.x = -1; + wined3d->adapters[0].monitorPoint.y = -1; + + wined3d->adapters[0].driver_info.name = "Display"; + wined3d->adapters[0].driver_info.description = "WineD3D DirectDraw Emulation"; + if (wined3d_settings.emulated_textureram) + wined3d->adapters[0].TextureRam = wined3d_settings.emulated_textureram; + else + wined3d->adapters[0].TextureRam = 8 * 1024 * 1024; /* This is plenty for a DDraw-only card */ - initPixelFormatsNoGL(&This->adapters[0].gl_info); + initPixelFormatsNoGL(&wined3d->adapters[0].gl_info); - This->adapter_count = 1; + wined3d->adapter_count = 1; return FALSE; } @@ -5281,7 +5280,7 @@ const struct wined3d_parent_ops wined3d_null_parent_ops = }; /* Do not call while under the GL lock. */ -HRESULT wined3d_init(IWineD3DImpl *wined3d, UINT version, void *parent) +HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent) { wined3d->dxVersion = version; wined3d->ref = 1; diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 623706f..edc3f8b 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -210,7 +210,7 @@ HRESULT resource_get_private_data(struct IWineD3DResourceImpl *resource, REFGUID if (d->flags & WINED3DSPD_IUNKNOWN) { *(IUnknown **)data = d->ptr.object; - if (((IWineD3DImpl *)resource->resource.device->wined3d)->dxVersion != 7) + if (resource->resource.device->wined3d->dxVersion != 7) { /* D3D8 and D3D9 addref the private data, DDraw does not. This * can't be handled in ddraw because it doesn't know if the diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 841662f..20930c4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2384,7 +2384,7 @@ void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL if (!pal) { - UINT dxVersion = ((IWineD3DImpl *)device->wined3d)->dxVersion; + UINT dxVersion = device->wined3d->dxVersion; /* In DirectDraw the palette is a property of the surface, there are no such things as device palettes. */ if (dxVersion <= 7) diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index c46ffe2..532314c 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -80,7 +80,7 @@ wined3d_settings_t wined3d_settings = /* Do not call while under the GL lock. */ struct wined3d * CDECL wined3d_create(UINT version, void *parent) { - IWineD3DImpl *object; + struct wined3d *object; HRESULT hr; object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); @@ -100,7 +100,7 @@ struct wined3d * CDECL wined3d_create(UINT version, void *parent) TRACE("Created wined3d object %p for d3d%d support.\n", object, version); - return (IWineD3D *)object; + return object; } static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5d4ad04..6af34e1 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -59,8 +59,6 @@ typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl; struct IWineD3DBaseShaderImpl; struct IWineD3DBaseTextureImpl; struct IWineD3DResourceImpl; -typedef struct wined3d IWineD3DImpl; -typedef struct wined3d IWineD3D; /* Texture format fixups */ @@ -1622,7 +1620,7 @@ struct wined3d struct wined3d_adapter adapters[1]; }; -HRESULT wined3d_init(IWineD3DImpl *wined3d, UINT version, void *parent) DECLSPEC_HIDDEN; +HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent) DECLSPEC_HIDDEN; BOOL wined3d_register_window(HWND window, struct IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN; void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN; @@ -1642,7 +1640,7 @@ struct IWineD3DDeviceImpl /* WineD3D Information */ IWineD3DDeviceParent *device_parent; - IWineD3D *wined3d; + struct wined3d *wined3d; struct wined3d_adapter *adapter; /* Window styles to restore when switching fullscreen mode */ @@ -1770,7 +1768,7 @@ HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, I BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) DECLSPEC_HIDDEN; -HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, +HRESULT device_init(IWineD3DDeviceImpl *device, struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags, IWineD3DDeviceParent *device_parent) DECLSPEC_HIDDEN; void device_preload_textures(IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
1
0
0
0
Henri Verbeet : wined3d: Remove COM from IWineD3D.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 36d4268e3c2991af2705e357e2b036c227d8b38e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36d4268e3c2991af2705e357e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Feb 1 19:39:53 2011 +0100 wined3d: Remove COM from IWineD3D. --- dlls/d3d8/d3d8_main.c | 2 +- dlls/d3d8/d3d8_private.h | 6 +- dlls/d3d8/device.c | 14 +- dlls/d3d8/directx.c | 28 +- dlls/d3d9/d3d9_main.c | 2 +- dlls/d3d9/d3d9_private.h | 5 +- dlls/d3d9/device.c | 23 +- dlls/d3d9/directx.c | 30 +- dlls/ddraw/ddraw.c | 44 +- dlls/ddraw/ddraw_private.h | 5 +- dlls/ddraw/device.c | 37 +- dlls/dxgi/adapter.c | 6 +- dlls/dxgi/device.c | 8 +- dlls/dxgi/dxgi_private.h | 2 +- dlls/dxgi/factory.c | 12 +- dlls/dxgi/output.c | 12 +- dlls/wined3d/device.c | 56 ++- dlls/wined3d/directx.c | 1057 +++++++++++++++++++--------------------- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/swapchain_base.c | 2 +- dlls/wined3d/wined3d.spec | 21 +- dlls/wined3d/wined3d_main.c | 2 +- dlls/wined3d/wined3d_private.h | 18 +- include/wine/wined3d.idl | 128 ++---- include/wine/winedxgi.idl | 2 +- 25 files changed, 721 insertions(+), 803 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=36d4268e3c2991af2705e…
1
0
0
0
Henri Verbeet : wined3d: Make volumetexture_ops static.
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 1fd7c96a31d7551b4efb3907b6ab123c830bbb64 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fd7c96a31d7551b4efb3907b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Feb 1 19:39:52 2011 +0100 wined3d: Make volumetexture_ops static. --- dlls/wined3d/volumetexture.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index ac7674a..7da1cf1 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -85,7 +85,7 @@ static void volumetexture_preload(IWineD3DBaseTextureImpl *texture, enum WINED3D texture->baseTexture.texture_rgb.dirty = FALSE; } -const struct wined3d_texture_ops volumetexture_ops = +static const struct wined3d_texture_ops volumetexture_ops = { volumetexture_bind, volumetexture_preload,
1
0
0
0
Henri Verbeet : d3d9/tests: Check another return value in maxmip_test() ( LLVM/Clang).
by Alexandre Julliard
02 Feb '11
02 Feb '11
Module: wine Branch: master Commit: 0fb6005fa80fa4671743384b49aa998524abee0a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0fb6005fa80fa4671743384b4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Feb 1 19:39:51 2011 +0100 d3d9/tests: Check another return value in maxmip_test() (LLVM/Clang). --- dlls/d3d9/tests/visual.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index c0cdf7e..f615369 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -3201,6 +3201,7 @@ static void maxmip_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quads[3], sizeof(*quads->v)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); } /* Max Mip level 0-2 sample from the specified texture level, Max Mip
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
67
68
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
Results per page:
10
25
50
100
200