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
December 2014
----- 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
319 discussions
Start a n
N
ew thread
Mark Harmstone : dsound: Use array for channel volumes.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: 25b13178de3ebac0c498b246c74068c2e50477b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25b13178de3ebac0c498b246c…
Author: Mark Harmstone <hellas(a)burntcomma.com> Date: Sat Dec 27 21:32:24 2014 +0000 dsound: Use array for channel volumes. --- dlls/dsound/dsound_private.h | 5 +- dlls/dsound/mixer.c | 34 ++++---- dlls/dsound/primary.c | 182 ++++++++++++++++++------------------------- 3 files changed, 96 insertions(+), 125 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=25b13178de3ebac0c498b…
1
0
0
0
Mark Harmstone : dsound: Remove unused struct entries.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: b7a2f0879c6982eff9e8923b3c3bdd437205bb36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7a2f0879c6982eff9e8923b3…
Author: Mark Harmstone <hellas(a)burntcomma.com> Date: Sat Dec 27 21:31:00 2014 +0000 dsound: Remove unused struct entries. --- dlls/dsound/dsound_private.h | 3 --- dlls/dsound/mixer.c | 8 -------- 2 files changed, 11 deletions(-) diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index a8f5f42..493df91 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -53,10 +53,7 @@ typedef struct _DSVOLUMEPAN DWORD dwTotalLeftAmpFactor; DWORD dwTotalRightAmpFactor; LONG lVolume; - DWORD dwVolAmpFactor; LONG lPan; - DWORD dwPanLeftAmpFactor; - DWORD dwPanRightAmpFactor; } DSVOLUMEPAN,*PDSVOLUMEPAN; /***************************************************************************** diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index 0fae20e..5e24382 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -51,8 +51,6 @@ void DSOUND_RecalcVolPan(PDSVOLUMEPAN volpan) TRACE("Vol=%d Pan=%d\n", volpan->lVolume, volpan->lPan); /* the AmpFactors are expressed in 16.16 fixed point */ - volpan->dwVolAmpFactor = (ULONG) (pow(2.0, volpan->lVolume / 600.0) * 0xffff); - /* FIXME: dwPan{Left|Right}AmpFactor */ /* FIXME: use calculated vol and pan ampfactors */ temp = (double) (volpan->lVolume - (volpan->lPan > 0 ? volpan->lPan : 0)); @@ -78,15 +76,9 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan) else right=600 * log(((double)volpan->dwTotalRightAmpFactor) / 0xffff) / log(2); if (left<right) - { volpan->lVolume=right; - volpan->dwVolAmpFactor=volpan->dwTotalRightAmpFactor; - } else - { volpan->lVolume=left; - volpan->dwVolAmpFactor=volpan->dwTotalLeftAmpFactor; - } if (volpan->lVolume < -10000) volpan->lVolume=-10000; volpan->lPan=right-left;
1
0
0
0
Alex Henrie : kernel32/tests: Add tabular UTF-7 decoding tests.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: ddc0c3203f1860f3a3a223f2215a40c5042ffa39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ddc0c3203f1860f3a3a223f22…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Fri Dec 26 00:15:32 2014 -0700 kernel32/tests: Add tabular UTF-7 decoding tests. --- dlls/kernel32/tests/codepage.c | 159 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index aa7977d..cab9019 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -681,6 +681,137 @@ static void test_utf7_decoding(void) 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 /* 0x70-0x7F */ }; + struct + { + /* inputs */ + char src[32]; + int srclen; + WCHAR *dst; + int dstlen; + /* expected outputs */ + WCHAR expected_dst[32]; + int chars_written; + int len; + } + tests[] = + { + /* tests string conversion with srclen=-1 */ + { + "+T2BZfQ-", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60,0x597D,0}, 3, 3 + }, + /* tests string conversion with srclen=-2 */ + { + "+T2BZfQ-", -2, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60,0x597D,0}, 3, 3 + }, + /* tests string conversion with dstlen=strlen(expected_dst) */ + { + "+T2BZfQ-", -1, output, 2, + {0x4F60,0x597D}, 2, 0 + }, + /* tests string conversion with dstlen=strlen(expected_dst)+1 */ + { + "+T2BZfQ-", -1, output, 3, + {0x4F60,0x597D,0}, 3, 3 + }, + /* tests string conversion with dstlen=strlen(expected_dst)+2 */ + { + "+T2BZfQ-", -1, output, 4, + {0x4F60,0x597D,0}, 3, 3 + }, + /* tests dry run with dst=NULL and dstlen=0 */ + { + "+T2BZfQ-", -1, NULL, 0, + {}, 0, 3 + }, + /* tests dry run with dst!=NULL and dstlen=0 */ + { + "+T2BZfQ-", -1, output, 0, + {}, 0, 3 + }, + /* tests ill-formed UTF-7: 6 bits, not enough for a byte pair */ + { + "+T-+T-+T-hello", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {'h','e','l','l','o',0}, 6, 6 + }, + /* tests ill-formed UTF-7: 12 bits, not enough for a byte pair */ + { + "+T2-+T2-+T2-hello", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {'h','e','l','l','o',0}, 6, 6 + }, + /* tests ill-formed UTF-7: 18 bits, not a multiple of 16 and the last bit is a 1 */ + { + "+T2B-+T2B-+T2B-hello", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60,0x4F60,0x4F60,'h','e','l','l','o',0}, 9, 9 + }, + /* tests ill-formed UTF-7: 24 bits, a multiple of 8 but not a multiple of 16 */ + { + "+T2BZ-+T2BZ-+T2BZ-hello", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60,0x4F60,0x4F60,'h','e','l','l','o',0}, 9, 9 + }, + /* tests UTF-7 followed by characters that should be encoded but aren't */ + { + "+T2BZ-\x82\xFE", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60,0x0082,0x00FE,0}, 4, 4 + }, + /* tests srclen > strlen(src) */ + { + "a\0b", 4, output, sizeof(output) / sizeof(WCHAR) - 1, + {'a',0,'b',0}, 4, 4 + }, + /* tests srclen < strlen(src) outside of a UTF-7 sequence */ + { + "hello", 2, output, sizeof(output) / sizeof(WCHAR) - 1, + {'h','e'}, 2, 2 + }, + /* tests srclen < strlen(src) inside of a UTF-7 sequence */ + { + "+T2BZfQ-", 4, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60}, 1, 1 + }, + /* tests srclen < strlen(src) right at the beginning of a UTF-7 sequence */ + { + "hi+T2A-", 3, output, sizeof(output) / sizeof(WCHAR) - 1, + {'h','i'}, 2, 2 + }, + /* tests srclen < strlen(src) right at the end of a UTF-7 sequence */ + { + "+T2A-hi", 5, output, sizeof(output) / sizeof(WCHAR) - 1, + {0x4F60}, 1, 1 + }, + /* tests srclen < strlen(src) at the beginning of an escaped + sign */ + { + "hi+-", 3, output, sizeof(output) / sizeof(WCHAR) - 1, + {'h','i'}, 2, 2 + }, + /* tests srclen < strlen(src) at the end of an escaped + sign */ + { + "+-hi", 2, output, sizeof(output) / sizeof(WCHAR) - 1, + {'+'}, 1, 1 + }, + /* tests len=0 but no error */ + { + "+", 1, output, sizeof(output) / sizeof(WCHAR) - 1, + {}, 0, 0 + }, + /* tests a single null char */ + { + "", -1, output, sizeof(output) / sizeof(WCHAR) - 1, + {0}, 1, 1 + }, + /* tests a buffer that runs out while not decoding a UTF-7 sequence */ + { + "hello", -1, output, 2, + {'h','e'}, 2, 0 + }, + /* tests a buffer that runs out in the middle of decoding a UTF-7 sequence */ + { + "+T2BZfQ-", -1, output, 1, + {0x4F60}, 1, 0 + } + }; + if (MultiByteToWideChar(CP_UTF7, 0, "foobar", -1, NULL, 0) == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { @@ -781,6 +912,34 @@ static void test_utf7_decoding(void) "i=0x%02x: expected output=%s, got output=%s\n", i, wine_dbgstr_wn(expected, expected_len + 1), wine_dbgstr_wn(output, expected_len + 1)); } + + for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) + { + memset(output, 0x23, sizeof(output) - sizeof(WCHAR)); + output[sizeof(output) / sizeof(WCHAR) - 1] = 0; + SetLastError(0xdeadbeef); + + len = MultiByteToWideChar(CP_UTF7, 0, tests[i].src, tests[i].srclen, + tests[i].dst, tests[i].dstlen); + + tests[i].expected_dst[tests[i].chars_written] = 0x2323; + + if (!tests[i].len && tests[i].chars_written) + { + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "tests[%i]: expected error=0x%x, got error=0x%x\n", + i, ERROR_INSUFFICIENT_BUFFER, GetLastError()); + } + ok(len == tests[i].len, "tests[%i]: expected len=%i, got len=%i\n", i, tests[i].len, len); + + if (tests[i].dst) + { + ok(memcmp(tests[i].dst, tests[i].expected_dst, (tests[i].chars_written + 1) * sizeof(WCHAR)) == 0, + "tests[%i]: expected dst=%s, got dst=%s\n", + i, wine_dbgstr_wn(tests[i].expected_dst, tests[i].chars_written + 1), + wine_dbgstr_wn(tests[i].dst, tests[i].chars_written + 1)); + } + } } static void test_undefined_byte_char(void)
1
0
0
0
Nikolay Sivov : msdmo: Fix RegOpenKeyExW() failure condition.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: 6eab4981601408237b9eac0f3e49f33562df6a82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6eab4981601408237b9eac0f3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Dec 29 00:22:11 2014 +0300 msdmo: Fix RegOpenKeyExW() failure condition. Spotted by Mark Harmstone. --- dlls/msdmo/dmoreg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c index 77ddfa6..74ab6b6 100644 --- a/dlls/msdmo/dmoreg.c +++ b/dlls/msdmo/dmoreg.c @@ -364,6 +364,7 @@ static HRESULT IEnumDMO_Constructor( IEnumDMOImpl* lpedmo; HRESULT hr = S_OK; UINT size; + LONG ret; *obj = NULL; @@ -406,8 +407,8 @@ static HRESULT IEnumDMO_Constructor( /* If not filtering by category enum from media objects root */ if (IsEqualGUID(guidCategory, &GUID_NULL)) { - if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &lpedmo->hkey)) - hr = E_FAIL; + if ((ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &lpedmo->hkey))) + hr = HRESULT_FROM_WIN32(ret); } else { @@ -416,8 +417,8 @@ static HRESULT IEnumDMO_Constructor( wsprintfW(szKey, szCat3Fmt, szDMORootKey, szDMOCategories, GUIDToString(szguid, guidCategory)); - if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &lpedmo->hkey)) - hr = E_FAIL; + if ((ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &lpedmo->hkey))) + hr = HRESULT_FROM_WIN32(ret); } lerr:
1
0
0
0
Nikolay Sivov : msdmo: Registry API functions don't return HRESULT codes.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: 5c91d011bbdff0cac6535c866ef5498b1ddc42c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c91d011bbdff0cac6535c866…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Dec 29 00:13:56 2014 +0300 msdmo: Registry API functions don't return HRESULT codes. --- dlls/msdmo/dmoreg.c | 83 +++++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c index e8f67c5..77ddfa6 100644 --- a/dlls/msdmo/dmoreg.c +++ b/dlls/msdmo/dmoreg.c @@ -129,10 +129,11 @@ static BOOL IsMediaTypeEqual(const DMO_PARTIAL_MEDIATYPE* mt1, const DMO_PARTIAL static HRESULT write_types(HKEY hkey, LPCWSTR name, const DMO_PARTIAL_MEDIATYPE* types, DWORD count) { - HRESULT hres = S_OK; + LONG ret; + if (MSDMO_MAJOR_VERSION > 5) { - hres = RegSetValueExW(hkey, name, 0, REG_BINARY, (const BYTE*) types, + ret = RegSetValueExW(hkey, name, 0, REG_BINARY, (const BYTE*) types, count* sizeof(DMO_PARTIAL_MEDIATYPE)); } else @@ -141,15 +142,18 @@ static HRESULT write_types(HKEY hkey, LPCWSTR name, const DMO_PARTIAL_MEDIATYPE* DWORD index = 0; WCHAR szGuidKey[64]; - hres = RegCreateKeyExW(hkey, name, 0, NULL, REG_OPTION_NON_VOLATILE, + ret = RegCreateKeyExW(hkey, name, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &skey1, NULL); + if (ret) + return HRESULT_FROM_WIN32(ret); + while (index < count) { GUIDToString(szGuidKey,&types[index].type); - hres = RegCreateKeyExW(skey1, szGuidKey, 0, NULL, + ret = RegCreateKeyExW(skey1, szGuidKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &skey2, NULL); GUIDToString(szGuidKey,&types[index].subtype); - hres = RegCreateKeyExW(skey2, szGuidKey, 0, NULL, + ret = RegCreateKeyExW(skey2, szGuidKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &skey3, NULL); RegCloseKey(skey3); RegCloseKey(skey2); @@ -158,7 +162,7 @@ static HRESULT write_types(HKEY hkey, LPCWSTR name, const DMO_PARTIAL_MEDIATYPE* RegCloseKey(skey1); } - return hres; + return HRESULT_FROM_WIN32(ret); } /*************************************************************** @@ -256,29 +260,29 @@ lend: */ HRESULT WINAPI DMOUnregister(REFCLSID clsidDMO, REFGUID guidCategory) { - HRESULT hres; WCHAR szguid[64]; HKEY hrkey = 0; HKEY hckey = 0; + LONG ret; GUIDToString(szguid, clsidDMO); TRACE("%s %p\n", debugstr_w(szguid), guidCategory); - hres = RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_WRITE, &hrkey); - if (ERROR_SUCCESS != hres) + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_WRITE, &hrkey); + if (ERROR_SUCCESS != ret) goto lend; - hres = RegDeleteKeyW(hrkey, szguid); - if (ERROR_SUCCESS != hres) + ret = RegDeleteKeyW(hrkey, szguid); + if (ERROR_SUCCESS != ret) goto lend; - hres = RegOpenKeyExW(hrkey, szDMOCategories, 0, KEY_WRITE, &hckey); - if (ERROR_SUCCESS != hres) + ret = RegOpenKeyExW(hrkey, szDMOCategories, 0, KEY_WRITE, &hckey); + if (ERROR_SUCCESS != ret) goto lend; - hres = RegDeleteKeyW(hckey, szguid); - if (ERROR_SUCCESS != hres) + ret = RegDeleteKeyW(hckey, szguid); + if (ERROR_SUCCESS != ret) goto lend; lend: @@ -287,7 +291,7 @@ lend: if (hrkey) RegCloseKey(hrkey); - return hres; + return HRESULT_FROM_WIN32(ret); } @@ -299,27 +303,24 @@ lend: HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR szName[]) { WCHAR szguid[64]; - HRESULT hres; HKEY hrkey = 0; HKEY hkey = 0; static const INT max_name_len = 80; DWORD count; + LONG ret; TRACE("%s\n", debugstr_guid(clsidDMO)); - hres = RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, - 0, KEY_READ, &hrkey); - if (ERROR_SUCCESS != hres) + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &hrkey); + if (ERROR_SUCCESS != ret) goto lend; - hres = RegOpenKeyExW(hrkey, GUIDToString(szguid, clsidDMO), - 0, KEY_READ, &hkey); - if (ERROR_SUCCESS != hres) + ret = RegOpenKeyExW(hrkey, GUIDToString(szguid, clsidDMO), 0, KEY_READ, &hkey); + if (ERROR_SUCCESS != ret) goto lend; count = max_name_len * sizeof(WCHAR); - hres = RegQueryValueExW(hkey, NULL, NULL, NULL, - (LPBYTE) szName, &count); + ret = RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE) szName, &count); TRACE(" szName=%s\n", debugstr_w(szName)); lend: @@ -328,10 +329,9 @@ lend: if (hkey) RegCloseKey(hkey); - return hres; + return HRESULT_FROM_WIN32(ret); } - /************************************************************************** * IEnumDMOImpl_Destructor */ @@ -506,6 +506,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( DWORD len; UINT count = 0; HRESULT hres = S_OK; + LONG ret; IEnumDMOImpl *This = impl_from_IEnumDMO(iface); @@ -519,17 +520,20 @@ static HRESULT WINAPI IEnumDMO_fnNext( This->index++; len = MAX_PATH; - hres = RegEnumKeyExW(This->hkey, This->index, szNextKey, &len, NULL, NULL, NULL, &ft); - if (hres != ERROR_SUCCESS) + ret = RegEnumKeyExW(This->hkey, This->index, szNextKey, &len, NULL, NULL, NULL, &ft); + if (ret != ERROR_SUCCESS) + { + hres = HRESULT_FROM_WIN32(ret); break; + } TRACE("found %s\n", debugstr_w(szNextKey)); if (!(This->dwFlags & DMO_ENUMF_INCLUDE_KEYED)) { wsprintfW(szKey, szCat3Fmt, szDMORootKey, szNextKey, szDMOKeyed); - hres = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &hkey); - if (ERROR_SUCCESS == hres) + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &hkey); + if (ERROR_SUCCESS == ret) { RegCloseKey(hkey); /* Skip Keyed entries */ @@ -538,7 +542,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( } wsprintfW(szKey, szCat2Fmt, szDMORootKey, szNextKey); - hres = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &hkey); + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, szKey, 0, KEY_READ, &hkey); if (This->pInTypes) { @@ -550,7 +554,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( sizeof(szValue)/sizeof(DMO_PARTIAL_MEDIATYPE), (DMO_PARTIAL_MEDIATYPE*)szValue); - if (ERROR_SUCCESS != hres) + if (FAILED(hres)) { RegCloseKey(hkey); continue; @@ -587,7 +591,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( sizeof(szValue)/sizeof(DMO_PARTIAL_MEDIATYPE), (DMO_PARTIAL_MEDIATYPE*)szValue); - if (ERROR_SUCCESS != hres) + if (FAILED(hres)) { RegCloseKey(hkey); continue; @@ -617,8 +621,8 @@ static HRESULT WINAPI IEnumDMO_fnNext( /* Media object wasn't filtered so add it to return list */ Names[count] = NULL; len = MAX_PATH * sizeof(WCHAR); - hres = RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE) szValue, &len); - if (ERROR_SUCCESS == hres) + ret = RegQueryValueExW(hkey, NULL, NULL, NULL, (LPBYTE)szValue, &len); + if (ERROR_SUCCESS == ret) { Names[count] = HeapAlloc(GetProcessHeap(), 0, (strlenW(szValue) + 1) * sizeof(WCHAR)); if (Names[count]) @@ -718,11 +722,16 @@ static const IEnumDMOVtbl edmovt = HRESULT read_types(HKEY root, LPCWSTR key, ULONG *supplied, ULONG requested, DMO_PARTIAL_MEDIATYPE* types ) { HRESULT ret = S_OK; + if (MSDMO_MAJOR_VERSION > 5) { DWORD len; + LONG rc; + len = requested * sizeof(DMO_PARTIAL_MEDIATYPE); - ret = RegQueryValueExW(root, key, NULL, NULL, (LPBYTE) types, &len); + rc = RegQueryValueExW(root, key, NULL, NULL, (LPBYTE) types, &len); + ret = HRESULT_FROM_WIN32(rc); + *supplied = len / sizeof(DMO_PARTIAL_MEDIATYPE); } else
1
0
0
0
Alex Henrie : dpvoice: Decrement reference count in Release functions.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: 8479229ae80bb74270ca7400e37d0efe8f3857e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8479229ae80bb74270ca7400e…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sat Dec 27 23:35:16 2014 -0700 dpvoice: Decrement reference count in Release functions. --- dlls/dpvoice/client.c | 4 ++-- dlls/dpvoice/server.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/dpvoice/client.c b/dlls/dpvoice/client.c index 0fab0c5..29b5336 100644 --- a/dlls/dpvoice/client.c +++ b/dlls/dpvoice/client.c @@ -83,7 +83,7 @@ static ULONG WINAPI dpvclient_AddRef(IDirectPlayVoiceClient *iface) static ULONG WINAPI dpvclient_Release(IDirectPlayVoiceClient *iface) { IDirectPlayVoiceClientImpl *This = impl_from_IDirectPlayVoiceClient(iface); - ULONG ref = InterlockedIncrement(&This->ref); + ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n", This, ref); @@ -270,7 +270,7 @@ static ULONG WINAPI dpvtest_AddRef(IDirectPlayVoiceTest *iface) static ULONG WINAPI dpvtest_Release(IDirectPlayVoiceTest *iface) { IDirectPlayVoiceTestImpl *This = impl_from_IDirectPlayVoiceTest(iface); - ULONG ref = InterlockedIncrement(&This->ref); + ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n", This, ref); diff --git a/dlls/dpvoice/server.c b/dlls/dpvoice/server.c index eb2c9ed..e9291e2 100644 --- a/dlls/dpvoice/server.c +++ b/dlls/dpvoice/server.c @@ -68,10 +68,11 @@ static ULONG WINAPI dpvserver_AddRef(IDirectPlayVoiceServer *iface) return ref; } + static ULONG WINAPI dpvserver_Release(IDirectPlayVoiceServer *iface) { IDirectPlayVoiceServerImpl *This = impl_from_IDirectPlayVoiceServer(iface); - ULONG ref = InterlockedIncrement(&This->ref); + ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n", This, ref);
1
0
0
0
Nikolay Sivov : ntdll: Fix 'description' element parsing to allow empty elements.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: c134466224d0e709ab7ffc206013f79d70fe27d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c134466224d0e709ab7ffc206…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Dec 26 21:07:46 2014 +0300 ntdll: Fix 'description' element parsing to allow empty elements. --- dlls/kernel32/tests/actctx.c | 1 + dlls/ntdll/actctx.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index 97e7dd2..e30d985 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -97,6 +97,7 @@ static const char manifest3[] = "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">" "<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\"" " publicKeyToken=\"6595b6414666f1df\" />" +"<description />" "<file name=\"testlib.dll\">" "<windowClass>wndClass</windowClass>" " <comClass description=\"Test com class\"" diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 8fb6624..ba6378e 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1834,11 +1834,16 @@ static BOOL parse_binding_redirect_elem(xmlbuf_t* xmlbuf) static BOOL parse_description_elem(xmlbuf_t* xmlbuf) { - xmlstr_t elem, content; - BOOL end = FALSE, ret = TRUE; + xmlstr_t elem, content, attr_name, attr_value; + BOOL end = FALSE, ret = TRUE, error = FALSE; - if (!parse_expect_no_attr(xmlbuf, &end) || end || - !parse_text_content(xmlbuf, &content)) + while (next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end)) + WARN("unknown attr %s=%s\n", debugstr_xmlstr(&attr_name), debugstr_xmlstr(&attr_value)); + + if (error) return FALSE; + if (end) return TRUE; + + if (!parse_text_content(xmlbuf, &content)) return FALSE; TRACE("Got description %s\n", debugstr_xmlstr(&content));
1
0
0
0
Nikolay Sivov : ntdll: Accept asm.v2 as default namespace.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: 37c179794e35bfe4283edfa425efc4e499cc652e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37c179794e35bfe4283edfa42…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Dec 26 18:49:03 2014 +0300 ntdll: Accept asm.v2 as default namespace. --- dlls/ntdll/actctx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 15c9994..8fb6624 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -656,6 +656,7 @@ static const struct olemisc_entry olemisc_values[] = static const WCHAR xmlW[] = {'?','x','m','l',0}; static const WCHAR manifestv1W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0}; +static const WCHAR manifestv2W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','2',0}; static const WCHAR manifestv3W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','3',0}; static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0}; @@ -2213,7 +2214,9 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl, } else if (xmlstr_cmp(&attr_name, xmlnsW)) { - if (!xmlstr_cmp(&attr_value, manifestv1W) && !xmlstr_cmp(&attr_value, manifestv3W)) + if (!xmlstr_cmp(&attr_value, manifestv1W) && + !xmlstr_cmp(&attr_value, manifestv2W) && + !xmlstr_cmp(&attr_value, manifestv3W)) { FIXME("wrong namespace %s\n", debugstr_xmlstr(&attr_value)); return FALSE;
1
0
0
0
Nikolay Sivov : dwrite: Update breakpoints in case of inline objects.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: cb4e88196372a9361517919e912a687e23a56eaa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb4e88196372a9361517919e9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Dec 26 00:01:28 2014 +0300 dwrite: Update breakpoints in case of inline objects. --- dlls/dwrite/layout.c | 109 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 90 insertions(+), 19 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 1ede48c..8717f63 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -121,7 +121,8 @@ struct dwrite_textlayout { struct list runs; BOOL recompute; - DWRITE_LINE_BREAKPOINT *breakpoints; + DWRITE_LINE_BREAKPOINT *nominal_breakpoints; + DWRITE_LINE_BREAKPOINT *actual_breakpoints; }; struct dwrite_textformat { @@ -226,6 +227,70 @@ static void free_layout_runs(struct dwrite_textlayout *layout) } } +/* should only be called for ranges with inline objects */ +static inline DWRITE_BREAK_CONDITION override_break_condition(DWRITE_BREAK_CONDITION existingbreak, DWRITE_BREAK_CONDITION newbreak) +{ + switch (existingbreak) { + case DWRITE_BREAK_CONDITION_NEUTRAL: + return newbreak; + case DWRITE_BREAK_CONDITION_CAN_BREAK: + return newbreak == DWRITE_BREAK_CONDITION_NEUTRAL ? existingbreak : newbreak; + /* let's keep stronger conditions as is */ + case DWRITE_BREAK_CONDITION_MAY_NOT_BREAK: + case DWRITE_BREAK_CONDITION_MUST_BREAK: + break; + default: + ERR("unknown break condition %d\n", existingbreak); + } + + return existingbreak; +} + +static HRESULT layout_update_breakpoints_range(struct dwrite_textlayout *layout, const struct layout_range *cur) +{ + DWRITE_BREAK_CONDITION before, after; + HRESULT hr; + UINT32 i; + + hr = IDWriteInlineObject_GetBreakConditions(cur->object, &before, &after); + if (FAILED(hr)) + return hr; + + if (!layout->actual_breakpoints) { + layout->actual_breakpoints = heap_alloc(sizeof(DWRITE_LINE_BREAKPOINT)*layout->len); + if (!layout->actual_breakpoints) + return E_OUTOFMEMORY; + } + memcpy(layout->actual_breakpoints, layout->nominal_breakpoints, sizeof(DWRITE_LINE_BREAKPOINT)*layout->len); + + for (i = cur->range.startPosition; i < cur->range.length + cur->range.startPosition; i++) { + UINT32 j = i + cur->range.startPosition; + if (i == 0) { + if (j) + layout->actual_breakpoints[j].breakConditionBefore = layout->actual_breakpoints[j-1].breakConditionAfter = + override_break_condition(layout->actual_breakpoints[j-1].breakConditionAfter, before); + else + layout->actual_breakpoints[j].breakConditionBefore = before; + + layout->actual_breakpoints[j].breakConditionAfter = DWRITE_BREAK_CONDITION_MAY_NOT_BREAK; + } + + layout->actual_breakpoints[j].isWhitespace = 0; + layout->actual_breakpoints[j].isSoftHyphen = 0; + + if (i == cur->range.length - 1) { + layout->actual_breakpoints[j].breakConditionBefore = DWRITE_BREAK_CONDITION_MAY_NOT_BREAK; + if (j < layout->len - 1) + layout->actual_breakpoints[j].breakConditionAfter = layout->actual_breakpoints[j+1].breakConditionAfter = + override_break_condition(layout->actual_breakpoints[j+1].breakConditionAfter, before); + else + layout->actual_breakpoints[j].breakConditionAfter = before; + } + } + + return S_OK; +} + static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) { IDWriteTextAnalyzer *analyzer; @@ -240,8 +305,12 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) LIST_FOR_EACH_ENTRY(cur, &layout->ranges, struct layout_range, entry) { /* inline objects override actual text in a range */ - if (cur->object) + if (cur->object) { + hr = layout_update_breakpoints_range(layout, cur); + if (FAILED(hr)) + return hr; continue; + } /* initial splitting by script */ hr = IDWriteTextAnalyzer_AnalyzeScript(analyzer, &layout->IDWriteTextAnalysisSource_iface, @@ -267,24 +336,13 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout) if (!layout->recompute) return S_OK; - hr = layout_compute_runs(layout); - - if (TRACE_ON(dwrite)) { - struct layout_run *cur; - - LIST_FOR_EACH_ENTRY(cur, &layout->runs, struct layout_run, entry) { - TRACE("run [%u,%u], len %u, bidilevel %u\n", cur->descr.textPosition, cur->descr.textPosition+cur->descr.stringLength-1, - cur->descr.stringLength, cur->run.bidiLevel); - } - } - /* nominal breakpoints are evaluated only once, because string never changes */ - if (!layout->breakpoints) { + if (!layout->nominal_breakpoints) { IDWriteTextAnalyzer *analyzer; HRESULT hr; - layout->breakpoints = heap_alloc(sizeof(DWRITE_LINE_BREAKPOINT)*layout->len); - if (!layout->breakpoints) + layout->nominal_breakpoints = heap_alloc(sizeof(DWRITE_LINE_BREAKPOINT)*layout->len); + if (!layout->nominal_breakpoints) return E_OUTOFMEMORY; hr = get_textanalyzer(&analyzer); @@ -296,6 +354,17 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout) IDWriteTextAnalyzer_Release(analyzer); } + hr = layout_compute_runs(layout); + + if (TRACE_ON(dwrite)) { + struct layout_run *cur; + + LIST_FOR_EACH_ENTRY(cur, &layout->runs, struct layout_run, entry) { + TRACE("run [%u,%u], len %u, bidilevel %u\n", cur->descr.textPosition, cur->descr.textPosition+cur->descr.stringLength-1, + cur->descr.stringLength, cur->run.bidiLevel); + } + } + layout->recompute = FALSE; return hr; } @@ -695,7 +764,8 @@ static ULONG WINAPI dwritetextlayout_Release(IDWriteTextLayout2 *iface) free_layout_ranges_list(This); free_layout_runs(This); release_format_data(&This->format); - heap_free(This->breakpoints); + heap_free(This->nominal_breakpoints); + heap_free(This->actual_breakpoints); heap_free(This->str); heap_free(This); } @@ -1601,7 +1671,7 @@ static HRESULT WINAPI dwritetextlayout_sink_SetLineBreakpoints(IDWriteTextAnalys if (position + length > layout->len) return E_FAIL; - memcpy(&layout->breakpoints[position], breakpoints, length*sizeof(DWRITE_LINE_BREAKPOINT)); + memcpy(&layout->nominal_breakpoints[position], breakpoints, length*sizeof(DWRITE_LINE_BREAKPOINT)); return S_OK; } @@ -1833,7 +1903,8 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *forma This->maxwidth = maxwidth; This->maxheight = maxheight; This->recompute = TRUE; - This->breakpoints = NULL; + This->nominal_breakpoints = NULL; + This->actual_breakpoints = NULL; layout_format_from_textformat(This, format); list_init(&This->runs);
1
0
0
0
Nikolay Sivov : dwrite: Store nominal breakpoint data in layout.
by Alexandre Julliard
29 Dec '14
29 Dec '14
Module: wine Branch: master Commit: 83aafaaae80789868c46b090126a93bd59c59545 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83aafaaae80789868c46b0901…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Dec 25 14:03:19 2014 +0300 dwrite: Store nominal breakpoint data in layout. --- dlls/dwrite/layout.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 5b23a0c..1ede48c 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -120,6 +120,8 @@ struct dwrite_textlayout { struct list ranges; struct list runs; BOOL recompute; + + DWRITE_LINE_BREAKPOINT *breakpoints; }; struct dwrite_textformat { @@ -276,6 +278,24 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout) } } + /* nominal breakpoints are evaluated only once, because string never changes */ + if (!layout->breakpoints) { + IDWriteTextAnalyzer *analyzer; + HRESULT hr; + + layout->breakpoints = heap_alloc(sizeof(DWRITE_LINE_BREAKPOINT)*layout->len); + if (!layout->breakpoints) + return E_OUTOFMEMORY; + + hr = get_textanalyzer(&analyzer); + if (FAILED(hr)) + return hr; + + hr = IDWriteTextAnalyzer_AnalyzeLineBreakpoints(analyzer, &layout->IDWriteTextAnalysisSource_iface, + 0, layout->len, &layout->IDWriteTextAnalysisSink_iface); + IDWriteTextAnalyzer_Release(analyzer); + } + layout->recompute = FALSE; return hr; } @@ -675,6 +695,7 @@ static ULONG WINAPI dwritetextlayout_Release(IDWriteTextLayout2 *iface) free_layout_ranges_list(This); free_layout_runs(This); release_format_data(&This->format); + heap_free(This->breakpoints); heap_free(This->str); heap_free(This); } @@ -1575,7 +1596,13 @@ static HRESULT WINAPI dwritetextlayout_sink_SetScriptAnalysis(IDWriteTextAnalysi static HRESULT WINAPI dwritetextlayout_sink_SetLineBreakpoints(IDWriteTextAnalysisSink *iface, UINT32 position, UINT32 length, DWRITE_LINE_BREAKPOINT const* breakpoints) { - return E_NOTIMPL; + struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSink(iface); + + if (position + length > layout->len) + return E_FAIL; + + memcpy(&layout->breakpoints[position], breakpoints, length*sizeof(DWRITE_LINE_BREAKPOINT)); + return S_OK; } static HRESULT WINAPI dwritetextlayout_sink_SetBidiLevel(IDWriteTextAnalysisSink *iface, UINT32 position, @@ -1806,6 +1833,7 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *forma This->maxwidth = maxwidth; This->maxheight = maxheight; This->recompute = TRUE; + This->breakpoints = NULL; layout_format_from_textformat(This, format); list_init(&This->runs);
1
0
0
0
← Newer
1
2
3
4
5
6
...
32
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
Results per page:
10
25
50
100
200