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
March 2010
----- 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
3 participants
919 discussions
Start a n
N
ew thread
Jörg Höhle : mciavi: Prevent deadlock when closing while playing or when paused.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 22569e6dcea72c9e170c1b0ef6dca9526b1eb87c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22569e6dcea72c9e170c1b0ef…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Mar 10 20:32:33 2010 +0100 mciavi: Prevent deadlock when closing while playing or when paused. --- dlls/mciavi32/mciavi.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/mciavi32/mciavi.c b/dlls/mciavi32/mciavi.c index d77525c..0963821 100644 --- a/dlls/mciavi32/mciavi.c +++ b/dlls/mciavi32/mciavi.c @@ -89,6 +89,7 @@ static DWORD MCIAVI_drvOpen(LPCWSTR str, LPMCI_OPEN_DRIVER_PARMSW modp) wma->hStopEvent = CreateEventW(NULL, FALSE, FALSE, NULL); wma->wDevID = modp->wDeviceID; wma->wCommandTable = mciLoadCommandResource(MCIAVI_hInstance, mciAviWStr, 0); + wma->dwStatus = MCI_MODE_NOT_READY; modp->wCustomCommandTable = wma->wCommandTable; modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO; mciSetDriverData(wma->wDevID, (DWORD_PTR)wma); @@ -301,11 +302,11 @@ DWORD MCIAVI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) wma = MCIAVI_mciGetOpenDev(wDevID); if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; + MCIAVI_mciStop(wDevID, MCI_WAIT, NULL); + EnterCriticalSection(&wma->cs); if (wma->nUseCount == 1) { - if (wma->dwStatus != MCI_MODE_STOP) - dwRet = MCIAVI_mciStop(wDevID, MCI_WAIT, NULL); MCIAVI_CleanUp(wma); if ((dwFlags & MCI_NOTIFY) && lpParms) {
1
0
0
0
Dmitry Timoshkov : user32: Restore special handling of monochrome bitmaps removed by c2202929ab4b6d1ce379865dfd8904186814f265 .
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 52ebbb8aa75b8f5d8b72c48127761ceec073e071 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52ebbb8aa75b8f5d8b72c4812…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Thu Mar 11 16:22:33 2010 +0800 user32: Restore special handling of monochrome bitmaps removed by c2202929ab4b6d1ce379865dfd8904186814f265. --- dlls/user32/cursoricon.c | 49 ++++++++++++++++++++++++++++++++++----------- 1 files changed, 37 insertions(+), 12 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index a003cb0..0a9a895 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -765,6 +765,7 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, int sizeAnd, sizeXor; HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */ BITMAP bmpXor, bmpAnd; + BOOL do_stretch; INT size; BITMAPINFO *pSrcInfo, *pDestInfo; @@ -788,10 +789,11 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, if (!width) width = bmi->bmiHeader.biWidth; if (!height) height = bmi->bmiHeader.biHeight/2; + do_stretch = (bmi->bmiHeader.biHeight/2 != height) || + (bmi->bmiHeader.biWidth != width); /* Scale the hotspot */ - if (((bmi->bmiHeader.biHeight/2 != height) || (bmi->bmiHeader.biWidth != width)) && - hotspot.x != ICON_HOTSPOT && hotspot.y != ICON_HOTSPOT) + if (do_stretch && hotspot.x != ICON_HOTSPOT && hotspot.y != ICON_HOTSPOT) { hotspot.x = (hotspot.x * width) / bmi->bmiHeader.biWidth; hotspot.y = (hotspot.y * height) / (bmi->bmiHeader.biHeight / 2); @@ -842,16 +844,30 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, } else { - hXorBits = CreateCompatibleBitmap(screen_dc, width, height); - - if(hXorBits) + if (do_stretch) { - if(!stretch_blt_icon(hXorBits, pDestInfo, pSrcInfo, (char*)bmi + size)) + hXorBits = CreateCompatibleBitmap(screen_dc, width, height); + if (hXorBits) { - DeleteObject(hXorBits); - hXorBits = 0; + if (!stretch_blt_icon(hXorBits, pDestInfo, pSrcInfo, (char*)bmi + size)) + { + DeleteObject(hXorBits); + hXorBits = 0; + } } } + else + { + if (is_dib_monochrome(bmi)) + { + hXorBits = CreateBitmap(width, height, 1, 1, NULL); + SetDIBits(screen_dc, hXorBits, 0, height, + (char *)bmi + size, pSrcInfo, DIB_RGB_COLORS); + } + else + hXorBits = CreateDIBitmap(screen_dc, &pSrcInfo->bmiHeader, + CBM_INIT, (char *)bmi + size, pSrcInfo, DIB_RGB_COLORS); + } } if( hXorBits ) @@ -879,12 +895,21 @@ static HICON CURSORICON_CreateIconFromBMI( BITMAPINFO *bmi, } /* Create the AND bitmap */ - hAndBits = CreateBitmap(width, height, 1, 1, NULL); + if (do_stretch) + { + hAndBits = CreateBitmap(width, height, 1, 1, NULL); - if(!stretch_blt_icon(hAndBits, pDestInfo, pSrcInfo, xbits)) + if (!stretch_blt_icon(hAndBits, pDestInfo, pSrcInfo, xbits)) + { + DeleteObject(hAndBits); + hAndBits = 0; + } + } + else { - DeleteObject(hAndBits); - hAndBits = 0; + hAndBits = CreateBitmap(width, height, 1, 1, NULL); + SetDIBits(screen_dc, hAndBits, 0, height, + xbits, pSrcInfo, DIB_RGB_COLORS); } if( !hAndBits )
1
0
0
0
Juan Lang : include: Add a few missing OIDs.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 8447844d81505864360940056f2eb29b548bfc0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8447844d81505864360940056…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Mar 5 14:20:20 2010 -0800 include: Add a few missing OIDs. --- include/wincrypt.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/wincrypt.h b/include/wincrypt.h index ad51e09..e536213 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -2782,6 +2782,9 @@ typedef struct _CTL_FIND_SUBJECT_PARA #define szOID_RSA_MD5RSA "1.2.840.113549.1.1.4" #define szOID_RSA_SHA1RSA "1.2.840.113549.1.1.5" #define szOID_RSA_SET0AEP_RSA "1.2.840.113549.1.1.6" +#define szOID_RSA_SHA256RSA "1.2.840.113549.1.1.11" +#define szOID_RSA_SHA384RSA "1.2.840.113549.1.1.12" +#define szOID_RSA_SHA512RSA "1.2.840.113549.1.1.13" #define szOID_RSA_DH "1.2.840.113549.1.3.1" #define szOID_RSA_data "1.2.840.113549.1.7.1" #define szOID_RSA_signedData "1.2.840.113549.1.7.2"
1
0
0
0
Juan Lang : rsaenh: Add simple tests for SHA-256, SHA-384, and SHA-512.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 972031643fc10a923afb372d1e713ebb4bb52286 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=972031643fc10a923afb372d1…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Mar 8 10:56:56 2010 -0800 rsaenh: Add simple tests for SHA-256, SHA-384, and SHA-512. --- dlls/rsaenh/tests/rsaenh.c | 112 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 112 insertions(+), 0 deletions(-) diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 743a300..ce907f5 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -452,6 +452,17 @@ static void test_hashes(void) result = CryptDestroyHash(hHash); ok(result, "%08x\n", GetLastError()); + + /* The SHA-2 variants aren't supported in the RSA full provider */ + result = CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash); + ok(!result && GetLastError() == NTE_BAD_ALGID, + "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + result = CryptCreateHash(hProv, CALG_SHA_384, 0, 0, &hHash); + ok(!result && GetLastError() == NTE_BAD_ALGID, + "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + result = CryptCreateHash(hProv, CALG_SHA_512, 0, 0, &hHash); + ok(!result && GetLastError() == NTE_BAD_ALGID, + "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); } static void test_block_cipher_modes(void) @@ -758,6 +769,106 @@ static void test_aes(int keylen) ok(result, "%08x\n", GetLastError()); } +static void test_sha2(void) +{ + static const unsigned char sha256hash[32] = { + 0x10, 0xfc, 0x3c, 0x51, 0xa1, 0x52, 0xe9, 0x0e, 0x5b, 0x90, + 0x31, 0x9b, 0x60, 0x1d, 0x92, 0xcc, 0xf3, 0x72, 0x90, 0xef, + 0x53, 0xc3, 0x5f, 0xf9, 0x25, 0x07, 0x68, 0x7d, 0x8a, 0x91, + 0x1a, 0x08 + }; + static const unsigned char sha384hash[48] = { + 0x98, 0xd3, 0x3f, 0x89, 0x0b, 0x23, 0x33, 0x44, 0x61, 0x32, + 0x5a, 0x7c, 0xa3, 0x03, 0x89, 0xb5, 0x11, 0xd7, 0x41, 0xc8, + 0x54, 0x6b, 0x12, 0x0c, 0x40, 0x15, 0xb6, 0x2a, 0x03, 0x43, + 0xe5, 0x64, 0x7f, 0x10, 0x1e, 0xae, 0x47, 0xa9, 0x39, 0x05, + 0x6f, 0x40, 0x60, 0x94, 0xd6, 0xad, 0x80, 0x55 + }; + static const unsigned char sha512hash[64] = { + 0x37, 0x86, 0x0e, 0x7d, 0x25, 0xd9, 0xf9, 0x84, 0x3e, 0x3d, + 0xc7, 0x13, 0x95, 0x73, 0x42, 0x04, 0xfd, 0x13, 0xad, 0x23, + 0x39, 0x16, 0x32, 0x5f, 0x99, 0x3e, 0x3c, 0xee, 0x3f, 0x11, + 0x36, 0xf9, 0xc9, 0x66, 0x08, 0x70, 0xcc, 0x49, 0xd8, 0xe0, + 0x7d, 0xa1, 0x57, 0x62, 0x71, 0xa6, 0xc9, 0xa4, 0x24, 0x60, + 0xfc, 0xde, 0x9d, 0xb2, 0xf1, 0xd2, 0xc2, 0xfb, 0x2d, 0xbf, + 0xb7, 0xf4, 0x81, 0xd4 + }; + unsigned char pbData[2048]; + BOOL result; + HCRYPTHASH hHash; + BYTE pbHashValue[64]; + DWORD hashlen, len; + int i; + + for (i=0; i<2048; i++) pbData[i] = (unsigned char)i; + + /* SHA-256 hash */ + result = CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash); + todo_wine + ok(result, "%08x\n", GetLastError()); + if (result) { + len = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); + ok(result && (hashlen == 32), "%08x, hashlen: %d\n", GetLastError(), hashlen); + + result = CryptHashData(hHash, pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + + len = 32; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, sha256hash, 32), "Wrong SHA-256 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + } + + /* SHA-384 hash */ + result = CryptCreateHash(hProv, CALG_SHA_384, 0, 0, &hHash); + todo_wine + ok(result, "%08x\n", GetLastError()); + if (result) { + len = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); + ok(result && (hashlen == 48), "%08x, hashlen: %d\n", GetLastError(), hashlen); + + result = CryptHashData(hHash, pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + + len = 48; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, sha384hash, 48), "Wrong SHA-384 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + } + + /* SHA-512 hash */ + result = CryptCreateHash(hProv, CALG_SHA_512, 0, 0, &hHash); + todo_wine + ok(result, "%08x\n", GetLastError()); + if (result) { + len = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); + ok(result && (hashlen == 64), "%08x, hashlen: %d\n", GetLastError(), hashlen); + + result = CryptHashData(hHash, pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + + len = 64; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, sha512hash, 64), "Wrong SHA-512 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + } +} + static void test_rc2(void) { static const BYTE rc2_40_encrypted[16] = { @@ -2581,5 +2692,6 @@ START_TEST(rsaenh) test_aes(128); test_aes(192); test_aes(256); + test_sha2(); clean_up_aes_environment(); }
1
0
0
0
Juan Lang : rsaenh: Fix some test failures on Win9x/NT4.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 5ebe73ef61b337ad20f16a3823eaa4001fac29d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ebe73ef61b337ad20f16a382…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Mar 8 11:21:51 2010 -0800 rsaenh: Fix some test failures on Win9x/NT4. --- dlls/rsaenh/tests/rsaenh.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 94da116..743a300 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -128,16 +128,28 @@ static int init_base_environment(DWORD dwKeyFlags) hProv = (HCRYPTPROV)INVALID_HANDLE_VALUE; result = CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d, %08x\n", result, GetLastError()); + ok(!result && (GetLastError()==NTE_BAD_FLAGS || + broken(GetLastError() == NTE_KEYSET_NOT_DEF /* Win9x/NT4 */)), + "%d, %08x\n", result, GetLastError()); if (!CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, 0)) { - ok(GetLastError()==NTE_BAD_KEYSET, "%08x\n", GetLastError()); - if (GetLastError()!=NTE_BAD_KEYSET) return 0; + ok(GetLastError()==NTE_BAD_KEYSET || + broken(GetLastError() == NTE_KEYSET_NOT_DEF /* Win9x/NT4 */), + "%08x\n", GetLastError()); + if (GetLastError()!=NTE_BAD_KEYSET) + { + win_skip("RSA full provider not available\n"); + return 0; + } result = CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_NEWKEYSET); ok(result, "%08x\n", GetLastError()); - if (!result) return 0; + if (!result) + { + win_skip("Couldn't create crypto provider\n"); + return 0; + } result = CryptGenKey(hProv, AT_KEYEXCHANGE, dwKeyFlags, &hKey); ok(result, "%08x\n", GetLastError()); if (result) CryptDestroyKey(hKey);
1
0
0
0
Roderick Colenbrander : wined3d: Remove oversize texture support.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 604caf0caae888c5765198416e9b5640a9e64efa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=604caf0caae888c5765198416…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Thu Mar 11 15:03:50 2010 +0100 wined3d: Remove oversize texture support. --- dlls/wined3d/surface.c | 23 ++++---- dlls/wined3d/texture.c | 2 +- dlls/wined3d/utils.c | 113 ++++------------------------------------ dlls/wined3d/wined3d_private.h | 5 +-- 4 files changed, 25 insertions(+), 118 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=604caf0caae888c576519…
1
0
0
0
Roderick Colenbrander : wined3d: Use surface_get_blt_info to compute texture coordinates for surface_blt_to_drawable .
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 74bf524a99769c4eadb15cf218d17e421b1e7253 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74bf524a99769c4eadb15cf21…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Fri Mar 5 19:52:01 2010 +0100 wined3d: Use surface_get_blt_info to compute texture coordinates for surface_blt_to_drawable. --- dlls/wined3d/surface.c | 427 +++++++++++++++++++----------------------------- 1 files changed, 167 insertions(+), 260 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=74bf524a99769c4eadb15…
1
0
0
0
Roderick Colenbrander : wined3d: Extend surface_get_depth_blt_info with texture coordinate code from surface_blt_to_drawable .
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 360384277bcdd74adcfaf265c6704c5ee7dc72ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=360384277bcdd74adcfaf265c…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Fri Mar 5 16:49:15 2010 +0100 wined3d: Extend surface_get_depth_blt_info with texture coordinate code from surface_blt_to_drawable. --- dlls/wined3d/surface.c | 149 ++++++++++++++++++++++++++++++----------------- 1 files changed, 95 insertions(+), 54 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d17d35c..2e8c365 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4324,9 +4324,41 @@ struct depth_blt_info GLfloat coords[4][3]; }; -static void surface_get_depth_blt_info(GLenum target, GLsizei w, GLsizei h, struct depth_blt_info *info) +struct coords { + GLfloat x, y, z; +}; + +struct float_rect +{ + float l; + float t; + float r; + float b; +}; + +static inline void cube_coords_float(const RECT *r, UINT w, UINT h, struct float_rect *f) +{ + f->l = ((r->left * 2.0f) / w) - 1.0f; + f->t = ((r->top * 2.0f) / h) - 1.0f; + f->r = ((r->right * 2.0f) / w) - 1.0f; + f->b = ((r->bottom * 2.0f) / h) - 1.0f; +} + +static void surface_get_depth_blt_info(GLenum target, const RECT *rect_in, GLsizei w, GLsizei h, struct depth_blt_info *info) { GLfloat (*coords)[3] = info->coords; + RECT rect; + struct float_rect f; + + if (rect_in) + rect = *rect_in; + else + { + rect.left = 0; + rect.top = 0; + rect.right = w; + rect.bottom = h; + } switch (target) { @@ -4337,75 +4369,104 @@ static void surface_get_depth_blt_info(GLenum target, GLsizei w, GLsizei h, stru info->binding = GL_TEXTURE_BINDING_2D; info->bind_target = GL_TEXTURE_2D; info->tex_type = tex_2d; - coords[0][0] = 0.0f; coords[0][1] = 1.0f; coords[0][2] = 0.0f; - coords[1][0] = 1.0f; coords[1][1] = 1.0f; coords[1][2] = 0.0f; - coords[2][0] = 0.0f; coords[2][1] = 0.0f; coords[2][2] = 0.0f; - coords[3][0] = 1.0f; coords[3][1] = 0.0f; coords[3][2] = 0.0f; + coords[0][0] = (float)rect.left / w; + coords[0][1] = (float)rect.top / h; + coords[0][2] = 0.0f; + + coords[1][0] = (float)rect.right / w; + coords[1][1] = (float)rect.top / h; + coords[1][2] = 0.0f; + + coords[2][0] = (float)rect.left / w; + coords[2][1] = (float)rect.bottom / h; + coords[2][2] = 0.0f; + + coords[3][0] = (float)rect.right / w; + coords[3][1] = (float)rect.bottom / h; + coords[3][2] = 0.0f; break; case GL_TEXTURE_RECTANGLE_ARB: info->binding = GL_TEXTURE_BINDING_RECTANGLE_ARB; info->bind_target = GL_TEXTURE_RECTANGLE_ARB; info->tex_type = tex_rect; - coords[0][0] = 0.0f; coords[0][1] = h; coords[0][2] = 0.0f; - coords[1][0] = w; coords[1][1] = h; coords[1][2] = 0.0f; - coords[2][0] = 0.0f; coords[2][1] = 0.0f; coords[2][2] = 0.0f; - coords[3][0] = w; coords[3][1] = 0.0f; coords[3][2] = 0.0f; + coords[0][0] = rect.left; coords[0][1] = rect.top; coords[0][2] = 0.0f; + coords[1][0] = rect.right; coords[1][1] = rect.top; coords[1][2] = 0.0f; + coords[2][0] = rect.left; coords[2][1] = rect.bottom; coords[2][2] = 0.0f; + coords[3][0] = rect.right; coords[3][1] = rect.bottom; coords[3][2] = 0.0f; break; case GL_TEXTURE_CUBE_MAP_POSITIVE_X: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - coords[0][0] = 1.0f; coords[0][1] = -1.0f; coords[0][2] = 1.0f; - coords[1][0] = 1.0f; coords[1][1] = -1.0f; coords[1][2] = -1.0f; - coords[2][0] = 1.0f; coords[2][1] = 1.0f; coords[2][2] = 1.0f; - coords[3][0] = 1.0f; coords[3][1] = 1.0f; coords[3][2] = -1.0f; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = 1.0f; coords[0][1] = -f.t; coords[0][2] = -f.l; + coords[1][0] = 1.0f; coords[1][1] = -f.t; coords[1][2] = -f.r; + coords[2][0] = 1.0f; coords[2][1] = -f.b; coords[2][2] = -f.l; + coords[3][0] = 1.0f; coords[3][1] = -f.b; coords[3][2] = -f.r; + break; case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = -1.0f; coords[0][2] = -1.0f; - coords[1][0] = -1.0f; coords[1][1] = -1.0f; coords[1][2] = 1.0f; - coords[2][0] = -1.0f; coords[2][1] = 1.0f; coords[2][2] = -1.0f; - coords[3][0] = -1.0f; coords[3][1] = 1.0f; coords[3][2] = 1.0f; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = -1.0f; coords[0][1] = -f.t; coords[0][2] = f.l; + coords[1][0] = -1.0f; coords[1][1] = -f.t; coords[1][2] = f.r; + coords[2][0] = -1.0f; coords[2][1] = -f.b; coords[2][2] = f.l; + coords[3][0] = -1.0f; coords[3][1] = -f.b; coords[3][2] = f.r; + break; case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = 1.0f; coords[0][2] = 1.0f; - coords[1][0] = 1.0f; coords[1][1] = 1.0f; coords[1][2] = 1.0f; - coords[2][0] = -1.0f; coords[2][1] = 1.0f; coords[2][2] = -1.0f; - coords[3][0] = 1.0f; coords[3][1] = 1.0f; coords[3][2] = -1.0f; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = f.l; coords[0][1] = 1.0f; coords[0][2] = f.t; + coords[1][0] = f.r; coords[1][1] = 1.0f; coords[1][2] = f.t; + coords[2][0] = f.l; coords[2][1] = 1.0f; coords[2][2] = f.b; + coords[3][0] = f.r; coords[3][1] = 1.0f; coords[3][2] = f.b; + break; case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = -1.0f; coords[0][2] = -1.0f; - coords[1][0] = 1.0f; coords[1][1] = -1.0f; coords[1][2] = -1.0f; - coords[2][0] = -1.0f; coords[2][1] = -1.0f; coords[2][2] = 1.0f; - coords[3][0] = 1.0f; coords[3][1] = -1.0f; coords[3][2] = 1.0f; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = f.l; coords[0][1] = -1.0f; coords[0][2] = -f.t; + coords[1][0] = f.r; coords[1][1] = -1.0f; coords[1][2] = -f.t; + coords[2][0] = f.l; coords[2][1] = -1.0f; coords[2][2] = -f.b; + coords[3][0] = f.r; coords[3][1] = -1.0f; coords[3][2] = -f.b; + break; case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - coords[0][0] = -1.0f; coords[0][1] = -1.0f; coords[0][2] = 1.0f; - coords[1][0] = 1.0f; coords[1][1] = -1.0f; coords[1][2] = 1.0f; - coords[2][0] = -1.0f; coords[2][1] = 1.0f; coords[2][2] = 1.0f; - coords[3][0] = 1.0f; coords[3][1] = 1.0f; coords[3][2] = 1.0f; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = f.l; coords[0][1] = -f.t; coords[0][2] = 1.0f; + coords[1][0] = f.r; coords[1][1] = -f.t; coords[1][2] = 1.0f; + coords[2][0] = f.l; coords[2][1] = -f.b; coords[2][2] = 1.0f; + coords[3][0] = f.r; coords[3][1] = -f.b; coords[3][2] = 1.0f; + break; case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: info->binding = GL_TEXTURE_BINDING_CUBE_MAP_ARB; info->bind_target = GL_TEXTURE_CUBE_MAP_ARB; info->tex_type = tex_cube; - coords[0][0] = 1.0f; coords[0][1] = -1.0f; coords[0][2] = -1.0f; - coords[1][0] = -1.0f; coords[1][1] = -1.0f; coords[1][2] = -1.0f; - coords[2][0] = 1.0f; coords[2][1] = 1.0f; coords[2][2] = -1.0f; - coords[3][0] = -1.0f; coords[3][1] = 1.0f; coords[3][2] = -1.0f; + cube_coords_float(&rect, w, h, &f); + + coords[0][0] = -f.l; coords[0][1] = -f.t; coords[0][2] = -1.0f; + coords[1][0] = -f.r; coords[1][1] = -f.t; coords[1][2] = -1.0f; + coords[2][0] = -f.l; coords[2][1] = -f.b; coords[2][2] = -1.0f; + coords[3][0] = -f.r; coords[3][1] = -f.b; coords[3][2] = -1.0f; + break; } } @@ -4429,7 +4490,7 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, GLuint texture, GLsizei glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glViewport(0, 0, w, h); - surface_get_depth_blt_info(target, w, h, &info); + surface_get_depth_blt_info(target, NULL, w, h, &info); GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); glGetIntegerv(info.binding, &old_binding); glBindTexture(info.bind_target, texture); @@ -4643,26 +4704,6 @@ static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW } } -struct coords { - GLfloat x, y, z; -}; - -struct float_rect -{ - float l; - float t; - float r; - float b; -}; - -static inline void cube_coords_float(const RECT *r, UINT w, UINT h, struct float_rect *f) -{ - f->l = ((r->left * 2.0f) / w) - 1.0f; - f->t = ((r->top * 2.0f) / h) - 1.0f; - f->r = ((r->right * 2.0f) / w) - 1.0f; - f->b = ((r->bottom * 2.0f) / h) - 1.0f; -} - static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT *rect_in) { IWineD3DDeviceImpl *device = This->resource.device;
1
0
0
0
Nikolay Sivov : msxml3: Treat input BSTR as general WCHAR string for :: loadXML().
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 2060d80d24980b1c85ca144b2c43c2b5cbbc7ec3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2060d80d24980b1c85ca144b2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 15 02:16:02 2010 +0300 msxml3: Treat input BSTR as general WCHAR string for ::loadXML(). --- dlls/msxml3/domdoc.c | 7 ++++--- dlls/msxml3/tests/domdoc.c | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index a29e9b2..aae8a34 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1650,19 +1650,20 @@ static HRESULT WINAPI domdoc_abort( static BOOL bstr_to_utf8( BSTR bstr, char **pstr, int *plen ) { - UINT len, blen = SysStringLen( bstr ); + UINT len; LPSTR str; - len = WideCharToMultiByte( CP_UTF8, 0, bstr, blen, NULL, 0, NULL, NULL ); + len = WideCharToMultiByte( CP_UTF8, 0, bstr, -1, NULL, 0, NULL, NULL ); str = heap_alloc( len ); if ( !str ) return FALSE; - WideCharToMultiByte( CP_UTF8, 0, bstr, blen, str, len, NULL, NULL ); + WideCharToMultiByte( CP_UTF8, 0, bstr, -1, str, len, NULL, NULL ); *plen = len; *pstr = str; return TRUE; } +/* don't rely on data to be in BSTR format, treat it as WCHAR string */ static HRESULT WINAPI domdoc_loadXML( IXMLDOMDocument2 *iface, BSTR bstrXML, diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 5f06d93..08b5776 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -535,6 +535,7 @@ static void test_domdoc( void ) BSTR str; LONG code; LONG nLength = 0; + WCHAR buff[100]; r = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); @@ -543,6 +544,12 @@ static void test_domdoc( void ) test_disp((IUnknown*)doc); +if (0) +{ + /* crashes on native */ + r = IXMLDOMDocument_loadXML( doc, (BSTR)0x1, NULL ); +} + /* try some stupid things */ r = IXMLDOMDocument_loadXML( doc, NULL, NULL ); ok( r == S_FALSE, "loadXML failed\n"); @@ -601,6 +608,15 @@ static void test_domdoc( void ) ok( r == S_FALSE, "should be no document element\n"); ok( element == NULL, "Element should be NULL\n"); + /* test for BSTR handling, pass broken BSTR */ + memcpy(&buff[2], szComplete1, sizeof(szComplete1)); + /* just a big length */ + *(DWORD*)buff = 0xf0f0; + b = VARIANT_FALSE; + r = IXMLDOMDocument_loadXML( doc, &buff[2], &b ); + ok( r == S_OK, "loadXML failed\n"); + ok( b == VARIANT_TRUE, "failed to load XML string\n"); + /* try to load something valid */ b = VARIANT_FALSE; str = SysAllocString( szComplete1 );
1
0
0
0
Nikolay Sivov : comctl32/datetime: Use user locale for format.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: b1b54ae39f912de0f7c02f544f85c569cd03d185 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1b54ae39f912de0f7c02f544…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 13 22:43:30 2010 +0300 comctl32/datetime: Use user locale for format. --- dlls/comctl32/datetime.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index c240d4f..96d041e 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -289,7 +289,7 @@ DATETIME_SetFormatW (DATETIME_INFO *infoPtr, LPCWSTR lpszFormat) format_item = LOCALE_STIMEFORMAT; else /* DTS_SHORTDATEFORMAT */ format_item = LOCALE_SSHORTDATE; - GetLocaleInfoW( GetSystemDefaultLCID(), format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0])); + GetLocaleInfoW(LOCALE_USER_DEFAULT, format_item, format_buf, sizeof(format_buf)/sizeof(format_buf[0])); lpszFormat = format_buf; } @@ -410,12 +410,12 @@ DATETIME_ReturnTxt (const DATETIME_INFO *infoPtr, int count, LPWSTR result, int wsprintfW (result, fmt__2dW, date.wMonth); break; case THREECHARMONTH: - GetLocaleInfoW(GetSystemDefaultLCID(), LOCALE_SMONTHNAME1+date.wMonth -1, + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1, buffer, sizeof(buffer)/sizeof(buffer[0])); wsprintfW (result, fmt__3sW, buffer); break; case FULLMONTH: - GetLocaleInfoW(GetSystemDefaultLCID(),LOCALE_SMONTHNAME1+date.wMonth -1, + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+date.wMonth -1, result, resultSize); break; case ONELETTERAMPM:
1
0
0
0
← Newer
1
...
61
62
63
64
65
66
67
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200