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
July 2023
----- 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
1 participants
865 discussions
Start a n
N
ew thread
Tyson Whitehead : crypt32: Add some CertGetNameStringW fallback cases.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: 694997f4f9aa24a93d2ab3ab097b36ee245d565a URL:
https://gitlab.winehq.org/wine/wine/-/commit/694997f4f9aa24a93d2ab3ab097b36…
Author: Tyson Whitehead <twhitehead(a)gmail.com> Date: Tue Mar 14 09:57:48 2023 -0400 crypt32: Add some CertGetNameStringW fallback cases. When called with CERT_NAME_ATTR_TYPE and pvTypePara=NULL, Windows did the first of email, CN, OU, or O while Wine just did email. (cherry picked from commit 01c69eb3023d2b85827020a8da8bb43c19560450) --- dlls/crypt32/str.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c index d74df308e4a..42046369652 100644 --- a/dlls/crypt32/str.c +++ b/dlls/crypt32/str.c @@ -965,11 +965,22 @@ static DWORD cert_get_name_from_rdn_attr(DWORD encodingType, if (CryptDecodeObjectEx(encodingType, X509_NAME, name->pbData, name->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &nameInfo, &bytes)) { - PCERT_RDN_ATTR nameAttr; + PCERT_RDN_ATTR nameAttr = NULL; - if (!oid) - oid = szOID_RSA_emailAddr; - nameAttr = CertFindRDNAttr(oid, nameInfo); + if (oid) + nameAttr = CertFindRDNAttr(oid, nameInfo); + else + { + static const LPCSTR attributeOIDs[] = + { + szOID_RSA_emailAddr, szOID_COMMON_NAME, + szOID_ORGANIZATIONAL_UNIT_NAME, szOID_ORGANIZATION_NAME + }; + DWORD i; + + for (i = 0; !nameAttr && i < ARRAY_SIZE(attributeOIDs); i++) + nameAttr = CertFindRDNAttr(attributeOIDs[i], nameInfo); + } if (nameAttr) ret = rdn_value_to_strW(nameAttr->dwValueType, &nameAttr->Value, pszNameString, cchNameString, TRUE);
1
0
0
0
Louis Lenders : wine.inf: Add EditionID to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: aed64c043359904ddd6107a0ad588fa0faed3849 URL:
https://gitlab.winehq.org/wine/wine/-/commit/aed64c043359904ddd6107a0ad588f…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Sat Mar 25 18:32:07 2023 +0100 wine.inf: Add EditionID to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54675
Conflicts: loader/wine.inf.in (cherry picked from commit e8b0c9239562ed78c94d7dba87d5004b4d82b113) --- loader/wine.inf.in | 1 + 1 file changed, 1 insertion(+) diff --git a/loader/wine.inf.in b/loader/wine.inf.in index f1525c4f6dd..20dc77e56a8 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2467,6 +2467,7 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 +HKLM,%CurrentVersionNT%,"EditionId",2,"Professional" HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7" HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT" HKLM,%Control%\Windows,"CSDVersion",0x10003,0x100
1
0
0
0
Alex Henrie : comctl32/treeview: Ignore the lParam to WM_PRINTCLIENT and add tests.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: 40ee74b5dc2c37608007004b79ed09e40594b0e7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/40ee74b5dc2c37608007004b79ed09…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Mar 14 21:59:04 2023 -0600 comctl32/treeview: Ignore the lParam to WM_PRINTCLIENT and add tests. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54640
(cherry picked from commit 231199bc462e2aa8fa98247b66022c62281fb508) --- dlls/comctl32/tests/treeview.c | 61 ++++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/treeview.c | 17 ++++-------- 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index eda57ed2c81..4b5703b6b76 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -2181,6 +2181,66 @@ static void test_WM_PAINT(void) DestroyWindow(hTree); } +static void test_WM_PRINTCLIENT(void) +{ + static const LPARAM params[] = {0, PRF_CHECKVISIBLE, PRF_NONCLIENT, PRF_CLIENT, PRF_ERASEBKGND, + PRF_CHILDREN, PRF_OWNED}; + BOOL glyph_is_transparent; + HTHEME hTheme; + HWND hTree; + COLORREF clr; + LONG ret; + RECT rc; + HDC hdc; + int i; + + hTree = create_treeview_control(0); + + clr = SendMessageA(hTree, TVM_SETBKCOLOR, 0, RGB(255, 0, 0)); + ok(clr == CLR_NONE, "got 0x%lx, expected 0x%lx\n", clr, CLR_NONE); + + hdc = GetDC(hMainWnd); + GetClientRect(hMainWnd, &rc); + + hTheme = pGetWindowTheme(hTree); + glyph_is_transparent = hTheme && pIsThemeBackgroundPartiallyTransparent(hTheme, TVP_GLYPH, 0); + + /* test parameters when the treeview is visible */ + for (i = 0; i < ARRAY_SIZE(params); i++) + { + winetest_push_context("lParam=0x%Ix", params[i]); + FillRect(hdc, &rc, GetStockObject(BLACK_BRUSH)); + clr = GetPixel(hdc, 1, 1); + ok(clr == RGB(0, 0, 0), "got 0x%lx\n", clr); + ret = SendMessageA(hTree, WM_PRINTCLIENT, (WPARAM)hdc, params[i]); + ok(ret == 0, "got %ld\n", ret); + clr = GetPixel(hdc, 1, 1); + ok(clr == RGB(255, 0, 0) || (glyph_is_transparent && clr == GetSysColor(COLOR_WINDOW)), + "got 0x%lx\n", clr); + winetest_pop_context(); + } + + /* test parameters when the treeview is hidden */ + ShowWindow(hTree, SW_HIDE); + for (i = 0; i < ARRAY_SIZE(params); i++) + { + winetest_push_context("lParam=0x%Ix", params[i]); + FillRect(hdc, &rc, GetStockObject(BLACK_BRUSH)); + clr = GetPixel(hdc, 1, 1); + ok(clr == RGB(0, 0, 0), "got 0x%lx\n", clr); + ret = SendMessageA(hTree, WM_PRINTCLIENT, (WPARAM)hdc, params[i]); + ok(ret == 0, "got %ld\n", ret); + clr = GetPixel(hdc, 1, 1); + ok(clr == RGB(255, 0, 0) || (glyph_is_transparent && clr == GetSysColor(COLOR_WINDOW)), + "got 0x%lx\n", clr); + winetest_pop_context(); + } + ShowWindow(hTree, SW_SHOW); + + ReleaseDC(hMainWnd, hdc); + DestroyWindow(hTree); +} + static void test_delete_items(void) { const struct message *msg; @@ -3042,6 +3102,7 @@ START_TEST(treeview) test_expandnotify(); test_TVS_SINGLEEXPAND(); test_WM_PAINT(); + test_WM_PRINTCLIENT(); test_delete_items(); test_cchildren(); test_htreeitem_layout(FALSE); diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 1c87dc29b05..e866f82db11 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3114,20 +3114,13 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, HDC hdc_ref) static LRESULT TREEVIEW_PrintClient(TREEVIEW_INFO *infoPtr, HDC hdc, DWORD options) { - FIXME("Partial Stub: (hdc=%p options=%#lx)\n", hdc, options); - - if ((options & PRF_CHECKVISIBLE) && !IsWindowVisible(infoPtr->hwnd)) - return 0; + RECT rc; - if (options & PRF_ERASEBKGND) - TREEVIEW_EraseBackground(infoPtr, hdc); + FIXME("Partial Stub: (hdc=%p options=%#lx)\n", hdc, options); - if (options & PRF_CLIENT) - { - RECT rc; - GetClientRect(infoPtr->hwnd, &rc); - TREEVIEW_Refresh(infoPtr, hdc, &rc); - } + TREEVIEW_EraseBackground(infoPtr, hdc); + GetClientRect(infoPtr->hwnd, &rc); + TREEVIEW_Refresh(infoPtr, hdc, &rc); return 0; }
1
0
0
0
Mohamad Al-Jaf : pdh/tests: Add PdhVbGetDoubleCounterValue() tests.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: dd4f5f9d79cc61dc62ef302111db1cab557fadad URL:
https://gitlab.winehq.org/wine/wine/-/commit/dd4f5f9d79cc61dc62ef302111db1c…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Sun Mar 5 17:35:21 2023 -0500 pdh/tests: Add PdhVbGetDoubleCounterValue() tests. (cherry picked from commit 2af11b6ee7736c3b26223b62233886e6a2616682) --- dlls/pdh/tests/pdh.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/dlls/pdh/tests/pdh.c b/dlls/pdh/tests/pdh.c index 195fd89eba5..e5d6fa8205e 100644 --- a/dlls/pdh/tests/pdh.c +++ b/dlls/pdh/tests/pdh.c @@ -34,6 +34,7 @@ static PDH_STATUS (WINAPI *pPdhAddEnglishCounterW)(PDH_HQUERY, LPCWSTR, DWORD_ static PDH_STATUS (WINAPI *pPdhCollectQueryDataWithTime)(PDH_HQUERY, LONGLONG *); static PDH_STATUS (WINAPI *pPdhValidatePathExA)(PDH_HLOG, LPCSTR); static PDH_STATUS (WINAPI *pPdhValidatePathExW)(PDH_HLOG, LPCWSTR); +static double (WINAPI *pPdhVbGetDoubleCounterValue)(PDH_HCOUNTER, PDH_STATUS *); #define GETFUNCPTR(func) p##func = (void *)GetProcAddress( pdh, #func ); @@ -69,6 +70,7 @@ static void init_function_ptrs( void ) GETFUNCPTR( PdhCollectQueryDataWithTime ) GETFUNCPTR( PdhValidatePathExA ) GETFUNCPTR( PdhValidatePathExW ) + GETFUNCPTR( PdhVbGetDoubleCounterValue ) } static const WCHAR processor_time[] = L"% Processor Time"; @@ -424,6 +426,46 @@ static void test_PdhGetRawCounterValue( void ) ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); } +static void test_PdhVbGetDoubleCounterValue(void) +{ + PDH_FMT_COUNTERVALUE value; + PDH_HCOUNTER counter; + PDH_STATUS status; + PDH_HQUERY query; + double ret; + + status = PdhOpenQueryA( NULL, 0, &query ); + ok(status == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", status); + + status = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); + ok(status == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", status); + + status = PdhCollectQueryData(query); + ok(status == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", status); + + status = PdhGetFormattedCounterValue( counter, PDH_FMT_DOUBLE, NULL, &value ); + ok(status == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", status); + + ret = pPdhVbGetDoubleCounterValue( NULL, NULL ); + ok(ret == 0.0, "Unexpected value %f\n", ret); + + status = PDH_FUNCTION_NOT_FOUND; + ret = pPdhVbGetDoubleCounterValue( NULL, &status ); + ok(status == PDH_INVALID_HANDLE, "PdhVbGetDoubleCounterValue failed 0x%08lx\n", status); + ok(ret == 0.0, "Unexpected value %f\n", ret); + + ret = pPdhVbGetDoubleCounterValue( counter, NULL ); + ok(ret == value.doubleValue, "Unexpected value %f\n", ret); + + status = PDH_FUNCTION_NOT_FOUND; + ret = pPdhVbGetDoubleCounterValue( counter, &status ); + ok(status == ERROR_SUCCESS, "PdhVbGetDoubleCounterValue failed 0x%08lx\n", status); + ok(ret == value.doubleValue, "Unexpected value %f\n", ret); + + status = PdhCloseQuery(query); + ok(status == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", status); +} + static void test_PdhSetCounterScaleFactor( void ) { PDH_STATUS ret; @@ -998,6 +1040,8 @@ START_TEST(pdh) test_PdhSetCounterScaleFactor(); test_PdhGetCounterTimeBase(); + test_PdhVbGetDoubleCounterValue(); + test_PdhGetCounterInfoA(); test_PdhGetCounterInfoW();
1
0
0
0
Mohamad Al-Jaf : pdh: Implement PdhVbGetDoubleCounterValue().
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: c747c1f2586bc2bbc67046a80a9100080336090c URL:
https://gitlab.winehq.org/wine/wine/-/commit/c747c1f2586bc2bbc67046a80a9100…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Tue Nov 1 20:49:41 2022 -0500 pdh: Implement PdhVbGetDoubleCounterValue(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54618
(cherry picked from commit e1c59cc5621a8d3420fc30314fd8daa5c6e55a26) --- dlls/pdh/pdh.spec | 2 +- dlls/pdh/pdh_main.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/pdh/pdh.spec b/dlls/pdh/pdh.spec index 5f61a8a42ca..711c970029b 100644 --- a/dlls/pdh/pdh.spec +++ b/dlls/pdh/pdh.spec @@ -145,7 +145,7 @@ @ stub PdhVbCreateCounterPathList @ stub PdhVbGetCounterPathElements @ stub PdhVbGetCounterPathFromList -@ stub PdhVbGetDoubleCounterValue +@ stdcall PdhVbGetDoubleCounterValue(ptr ptr) @ stub PdhVbGetLogFileSize @ stub PdhVbGetOneCounterPath @ stub PdhVbIsGoodStatus diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c index 7eae7872b48..121b7e712ce 100644 --- a/dlls/pdh/pdh_main.c +++ b/dlls/pdh/pdh_main.c @@ -1062,6 +1062,23 @@ PDH_STATUS WINAPI PdhVbAddCounter( PDH_HQUERY query, LPCSTR path, PDH_HCOUNTER * return PDH_NOT_IMPLEMENTED; } +/*********************************************************************** + * PdhVbGetDoubleCounterValue (PDH.@) + */ +double WINAPI PdhVbGetDoubleCounterValue( PDH_HCOUNTER handle, PDH_STATUS *counter_status ) +{ + PDH_FMT_COUNTERVALUE value; + PDH_STATUS status; + + TRACE( "%p %p\n", handle, counter_status ); + + memset( &value, 0, sizeof(value) ); + status = PdhGetFormattedCounterValue( handle, PDH_FMT_DOUBLE, NULL, &value ); + + if (counter_status) *counter_status = status; + return value.u.doubleValue; +} + /*********************************************************************** * PdhValidatePathExA (PDH.@) */
1
0
0
0
Vijay Kiran Kamuju : msvcr100: Add _UnrealizedChore::_CheckTaskCollection stub.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: 67da15b5dc921b3a41a68e6ca719f8ceb8e0ecec URL:
https://gitlab.winehq.org/wine/wine/-/commit/67da15b5dc921b3a41a68e6ca719f8…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Fri Mar 17 13:19:19 2023 +0000 msvcr100: Add _UnrealizedChore::_CheckTaskCollection stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53794
(cherry picked from commit 8426109a439c35334f72fbf12aa15948366b2fb4) --- dlls/concrt140/concrt140.spec | 6 +++--- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 6 +++--- dlls/msvcr120/msvcr120.spec | 6 +++--- dlls/msvcr120_app/msvcr120_app.spec | 6 +++--- dlls/msvcrt/concurrency.c | 8 ++++++++ 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 8ddf2255f31..f2b2789a5e2 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -440,9 +440,9 @@ @ stub -arch=arm ?_Cancel@_TaskCollection@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ -@ stub -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ -@ stub -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ +@ cdecl -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ thiscall -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ cdecl -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection @ stub -arch=arm ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAAXXZ @ stub -arch=i386 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAEXXZ @ stub -arch=win64 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AEAAXXZ diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index e2107055c24..3e2839b3908 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -313,8 +313,8 @@ @ cdecl -arch=win64 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QEAAXXZ(ptr) _StructuredTaskCollection__Cancel @ stub -arch=win32 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ -@ stub -arch=win32 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ -@ stub -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ +@ thiscall -arch=win32 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ cdecl -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection @ stub -arch=win32 ?_ConcRT_Assert@details@Concurrency@@YAXPBD0H@Z @ stub -arch=win64 ?_ConcRT_Assert@details@Concurrency@@YAXPEBD0H@Z @ stub -arch=win32 ?_ConcRT_CoreAssert@details@Concurrency@@YAXPBD0H@Z diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 4fc5a069fbb..c23293ea658 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -493,9 +493,9 @@ @ stub -arch=arm ?_Cancel@_TaskCollection@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ -@ stub -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ -@ stub -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ +@ cdecl -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ thiscall -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ cdecl -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection @ stub -arch=arm ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAAXXZ @ stub -arch=i386 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAEXXZ @ stub -arch=win64 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AEAAXXZ diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 7b379830d4b..6eac1937227 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -490,9 +490,9 @@ @ stub -arch=arm ?_Cancel@_TaskCollection@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ -@ stub -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ -@ stub -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ +@ cdecl -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ thiscall -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ(ptr) _UnrealizedChore__CheckTaskCollection +@ cdecl -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ(ptr) _UnrealizedChore__CheckTaskCollection @ stub -arch=arm ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAAXXZ @ stub -arch=i386 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAEXXZ @ stub -arch=win64 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AEAAXXZ diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 37282fc54f8..aad6ece8acc 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -487,9 +487,9 @@ @ stub -arch=arm ?_Cancel@_TaskCollection@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ -@ stub -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ -@ stub -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ +@ cdecl -arch=arm ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ(ptr) msvcr120.?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAAXXZ +@ thiscall -arch=i386 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ(ptr) msvcr120.?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ +@ cdecl -arch=win64 ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ(ptr) msvcr120.?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ @ stub -arch=arm ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAAXXZ @ stub -arch=i386 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AAEXXZ @ stub -arch=win64 ?_CleanupToken@_StructuredTaskCollection@details@Concurrency@@AEAAXXZ diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index fe156938e3a..01ba54308f0 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2224,6 +2224,14 @@ bool __thiscall _StructuredTaskCollection__IsCanceling( return FALSE; } +/* ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ */ +/* ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IEAAXXZ */ +DEFINE_THISCALL_WRAPPER(_UnrealizedChore__CheckTaskCollection, 4) +void __thiscall _UnrealizedChore__CheckTaskCollection(_UnrealizedChore *this) +{ + FIXME("() stub\n"); +} + /* ??0critical_section@Concurrency@@QAE@XZ */ /* ??0critical_section@Concurrency@@QEAA@XZ */ DEFINE_THISCALL_WRAPPER(critical_section_ctor, 4)
1
0
0
0
Michael Stefaniuc : dmsynth: Don't crash when Open() gets a DMUS_PORTPARAMS7.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: stable Commit: 27edcc17d812fa9c22deb1cf2e1dc4eb6b5be4b0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/27edcc17d812fa9c22deb1cf2e1dc4…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Mar 29 22:35:32 2023 +0200 dmsynth: Don't crash when Open() gets a DMUS_PORTPARAMS7. Wrong sizeof check: pointer instead of referenced structure. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53704
(cherry picked from commit 48fdc8e08c4150c74e6c740df82518405125541d) --- dlls/dmsynth/synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 121d9aadf35..3631bcfe784 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -163,7 +163,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_Open(IDirectMusicSynth8 *iface, DMU modified = TRUE; params->fShare = FALSE; - if (params->dwSize >= sizeof(params)) { + if (params->dwSize >= sizeof(*params)) { if (params->dwValidParams & DMUS_PORTPARAMS_FEATURES && params->dwFeatures) { if (params->dwFeatures & ~(DMUS_PORT_FEATURE_AUDIOPATH|DMUS_PORT_FEATURE_STREAMING)) { modified = TRUE;
1
0
0
0
Jeff Smith : windowscodecs: Allow GIF with no color table.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 224b771c0d8bf32bae9be5f066692a74978091cc URL:
https://gitlab.winehq.org/wine/wine/-/commit/224b771c0d8bf32bae9be5f066692a…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Sun Jul 16 15:16:57 2023 -0500 windowscodecs: Allow GIF with no color table. --- dlls/windowscodecs/gifformat.c | 32 +++++++++-------- dlls/windowscodecs/tests/gifformat.c | 70 ++++++++++++++++++++++++++++++++++++ dlls/windowscodecs/ungif.c | 1 + dlls/windowscodecs/ungif.h | 1 + 4 files changed, 89 insertions(+), 15 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 11b2ccf6aea..152c51eac76 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -743,20 +743,27 @@ static HRESULT WINAPI GifFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, GifFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); WICColor colors[256]; ColorMapObject *cm = This->frame->ImageDesc.ColorMap; + int count; TRACE("(%p,%p)\n", iface, pIPalette); - if (!cm) cm = This->parent->gif->SColorMap; + if (cm) + count = cm->ColorCount; + else + { + cm = This->parent->gif->SColorMap; + count = This->parent->gif->SColorTableSize; + } - if (cm->ColorCount > 256) + if (count > 256) { - ERR("GIF contains %i colors???\n", cm->ColorCount); + ERR("GIF contains %i colors???\n", count); return E_FAIL; } - copy_palette(cm, &This->frame->Extensions, cm->ColorCount, colors); + copy_palette(cm, &This->frame->Extensions, count, colors); - return IWICPalette_InitializeCustom(pIPalette, colors, cm->ColorCount); + return IWICPalette_InitializeCustom(pIPalette, colors, count); } static HRESULT copy_interlaced_pixels(const BYTE *srcbuffer, @@ -1196,18 +1203,13 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet return WINCODEC_ERR_WRONGSTATE; cm = This->gif->SColorMap; - if (cm) - { - if (cm->ColorCount > 256) - { - ERR("GIF contains invalid number of colors: %d\n", cm->ColorCount); - return E_FAIL; - } + count = This->gif->SColorTableSize; - count = cm->ColorCount; + if (count > 256) + { + ERR("GIF contains invalid number of colors: %d\n", count); + return E_FAIL; } - else - count = 256; copy_palette(cm, &This->gif->SavedImages[This->current_frame].Extensions, count, colors); diff --git a/dlls/windowscodecs/tests/gifformat.c b/dlls/windowscodecs/tests/gifformat.c index 8488f486a11..08f8ba1c12b 100644 --- a/dlls/windowscodecs/tests/gifformat.c +++ b/dlls/windowscodecs/tests/gifformat.c @@ -57,6 +57,13 @@ static const char gif_local_palette[] = { 0x02,0x02,0x44,0x01,0x00,0x3b }; +static const char gif_no_palette[] = { +/* LSD */'G','I','F','8','7','a',0x01,0x00,0x01,0x00,0x21,0x02,0x00, +/* GCE */0x21,0xf9,0x04,0x01,0x05,0x00,0x01,0x00, /* index 1 */ +/* IMD */0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00, +0x02,0x02,0x44,0x01,0x00,0x3b +}; + /* Generated with ImageMagick: * convert -delay 100 -size 2x2 xc:red \ * -dispose none -page +0+0 -size 2x1 xc:white \ @@ -364,6 +371,67 @@ static void test_local_gif_palette(void) IWICBitmapDecoder_Release(decoder); } +static void test_no_gif_palette(void) +{ + HRESULT hr; + IWICBitmapDecoder *decoder; + IWICBitmapFrameDecode *frame; + IWICPalette *palette; + GUID format; + UINT count, ret; + WICColor color[256]; + + decoder = create_decoder(gif_no_palette, sizeof(gif_no_palette)); + ok(decoder != 0, "Failed to load GIF image data\n"); + + hr = IWICImagingFactory_CreatePalette(factory, &palette); + ok(hr == S_OK, "CreatePalette error %#lx\n", hr); + + /* global palette */ + hr = IWICBitmapDecoder_CopyPalette(decoder, palette); + ok(hr == S_OK, "CopyPalette error %#lx\n", hr); + + hr = IWICPalette_GetColorCount(palette, &count); + ok(hr == S_OK, "GetColorCount error %#lx\n", hr); + ok(count == 4, "expected 4, got %u\n", count); + + hr = IWICPalette_GetColors(palette, count, color, &ret); + ok(hr == S_OK, "GetColors error %#lx\n", hr); + ok(ret == count, "expected %u, got %u\n", count, ret); + ok(color[0] == 0xff000000, "expected 0xff000000, got %#x\n", color[0]); + ok(color[1] == 0x00ffffff, "expected 0x00ffffff, got %#x\n", color[1]); + ok(color[2] == 0xff000000, "expected 0xff000000, got %#x\n", color[2]); + ok(color[3] == 0xff000000, "expected 0xff000000, got %#x\n", color[3]); + + /* frame palette */ + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + ok(hr == S_OK, "GetFrame error %#lx\n", hr); + + hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); + ok(hr == S_OK, "GetPixelFormat error %#lx\n", hr); + ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), + "wrong pixel format %s\n", wine_dbgstr_guid(&format)); + + hr = IWICBitmapFrameDecode_CopyPalette(frame, palette); + ok(hr == S_OK, "CopyPalette error %#lx\n", hr); + + hr = IWICPalette_GetColorCount(palette, &count); + ok(hr == S_OK, "GetColorCount error %#lx\n", hr); + ok(count == 4, "expected 4, got %u\n", count); + + hr = IWICPalette_GetColors(palette, count, color, &ret); + ok(hr == S_OK, "GetColors error %#lx\n", hr); + ok(ret == count, "expected %u, got %u\n", count, ret); + ok(color[0] == 0xff000000, "expected 0xff000000, got %#x\n", color[0]); + ok(color[1] == 0x00ffffff, "expected 0x00ffffff, got %#x\n", color[1]); + ok(color[2] == 0xff000000, "expected 0xff000000, got %#x\n", color[2]); + ok(color[3] == 0xff000000, "expected 0xff000000, got %#x\n", color[3]); + + IWICPalette_Release(palette); + IWICBitmapFrameDecode_Release(frame); + IWICBitmapDecoder_Release(decoder); +} + static void test_gif_frame_sizes(void) { static const BYTE frame0[] = {0, 1, 0xfe, 0xfe, 2, 3, 0xfe, 0xfe}; @@ -577,6 +645,7 @@ START_TEST(gifformat) test_global_gif_palette(); test_global_gif_palette_2frames(); test_local_gif_palette(); + test_no_gif_palette(); test_gif_frame_sizes(); test_gif_notrailer(); @@ -590,6 +659,7 @@ START_TEST(gifformat) test_global_gif_palette(); test_global_gif_palette_2frames(); test_local_gif_palette(); + test_no_gif_palette(); test_gif_frame_sizes(); test_truncated_gif(); diff --git a/dlls/windowscodecs/ungif.c b/dlls/windowscodecs/ungif.c index 0f5ed6e25d5..1fb16e52f15 100644 --- a/dlls/windowscodecs/ungif.c +++ b/dlls/windowscodecs/ungif.c @@ -320,6 +320,7 @@ DGifGetScreenDesc(GifFileType * GifFile) { GifFile->SColorResolution = (((Buf[0] & 0x70) + 1) >> 4) + 1; SortFlag = (Buf[0] & 0x08) != 0; BitsPerPixel = (Buf[0] & 0x07) + 1; + GifFile->SColorTableSize = 1 << BitsPerPixel; GifFile->SBackGroundColor = Buf[1]; GifFile->SAspectRatio = Buf[2]; if (Buf[0] & 0x80) { /* Do we have global color map? */ diff --git a/dlls/windowscodecs/ungif.h b/dlls/windowscodecs/ungif.h index ae8269226df..f61a7eb1e16 100644 --- a/dlls/windowscodecs/ungif.h +++ b/dlls/windowscodecs/ungif.h @@ -114,6 +114,7 @@ typedef struct { typedef struct GifFileType { GifWord SWidth, SHeight, /* Screen dimensions. */ SColorResolution, /* How many colors can we generate? */ + SColorTableSize, /* Calculated color table size, even if not present */ SBackGroundColor, /* I hope you understand this one... */ SAspectRatio; /* Pixel aspect ratio, in 1/64 units, starting at 1:4. */ ColorMapObject *SColorMap; /* NULL if not exists. */
1
0
0
0
Jeff Smith : windowscodecs: Factor out common GIF palette copying logic.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 8ff77999b5600b3cf995cd830b8ec678b6529d6f URL:
https://gitlab.winehq.org/wine/wine/-/commit/8ff77999b5600b3cf995cd830b8ec6…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Sun Jul 16 15:02:12 2023 -0500 windowscodecs: Factor out common GIF palette copying logic. --- dlls/windowscodecs/gifformat.c | 92 ++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 52 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index f0048d12da9..11b2ccf6aea 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -701,14 +701,49 @@ static HRESULT WINAPI GifFrameDecode_GetResolution(IWICBitmapFrameDecode *iface, return S_OK; } +static void copy_palette(ColorMapObject *cm, Extensions *extensions, int count, WICColor *colors) +{ + int i; + + if (cm) + { + for (i = 0; i < count; i++) + { + colors[i] = 0xff000000 | /* alpha */ + cm->Colors[i].Red << 16 | + cm->Colors[i].Green << 8 | + cm->Colors[i].Blue; + } + } + else + { + colors[0] = 0xff000000; + colors[1] = 0xffffffff; + for (i = 2; i < count; i++) + colors[i] = 0xff000000; + } + + /* look for the transparent color extension */ + for (i = 0; i < extensions->ExtensionBlockCount; i++) + { + ExtensionBlock *eb = extensions->ExtensionBlocks + i; + if (eb->Function == GRAPHICS_EXT_FUNC_CODE && + eb->ByteCount == 8 && eb->Bytes[3] & 1) + { + int trans = (unsigned char)eb->Bytes[6]; + colors[trans] &= 0xffffff; /* set alpha to 0 */ + break; + } + } +} + static HRESULT WINAPI GifFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, IWICPalette *pIPalette) { GifFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); WICColor colors[256]; ColorMapObject *cm = This->frame->ImageDesc.ColorMap; - int i, trans; - ExtensionBlock *eb; + TRACE("(%p,%p)\n", iface, pIPalette); if (!cm) cm = This->parent->gif->SColorMap; @@ -719,24 +754,7 @@ static HRESULT WINAPI GifFrameDecode_CopyPalette(IWICBitmapFrameDecode *iface, return E_FAIL; } - for (i = 0; i < cm->ColorCount; i++) { - colors[i] = 0xff000000| /* alpha */ - cm->Colors[i].Red << 16| - cm->Colors[i].Green << 8| - cm->Colors[i].Blue; - } - - /* look for the transparent color extension */ - for (i = 0; i < This->frame->Extensions.ExtensionBlockCount; ++i) { - eb = This->frame->Extensions.ExtensionBlocks + i; - if (eb->Function == GRAPHICS_EXT_FUNC_CODE && eb->ByteCount == 8) { - if (eb->Bytes[3] & 1) { - trans = (unsigned char)eb->Bytes[6]; - colors[trans] &= 0xffffff; /* set alpha to 0 */ - break; - } - } - } + copy_palette(cm, &This->frame->Extensions, cm->ColorCount, colors); return IWICPalette_InitializeCustom(pIPalette, colors, cm->ColorCount); } @@ -1170,8 +1188,7 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet GifDecoder *This = impl_from_IWICBitmapDecoder(iface); WICColor colors[256]; ColorMapObject *cm; - int i, trans, count; - ExtensionBlock *eb; + int count; TRACE("(%p,%p)\n", iface, palette); @@ -1187,41 +1204,12 @@ static HRESULT WINAPI GifDecoder_CopyPalette(IWICBitmapDecoder *iface, IWICPalet return E_FAIL; } - for (i = 0; i < cm->ColorCount; i++) - { - colors[i] = 0xff000000 | /* alpha */ - cm->Colors[i].Red << 16 | - cm->Colors[i].Green << 8 | - cm->Colors[i].Blue; - } - count = cm->ColorCount; } else - { - colors[0] = 0xff000000; - colors[1] = 0xffffffff; - - for (i = 2; i < 256; i++) - colors[i] = 0xff000000; - count = 256; - } - /* look for the transparent color extension */ - for (i = 0; i < This->gif->SavedImages[This->current_frame].Extensions.ExtensionBlockCount; i++) - { - eb = This->gif->SavedImages[This->current_frame].Extensions.ExtensionBlocks + i; - if (eb->Function == GRAPHICS_EXT_FUNC_CODE && eb->ByteCount == 8) - { - if (eb->Bytes[3] & 1) - { - trans = (unsigned char)eb->Bytes[6]; - colors[trans] &= 0xffffff; /* set alpha to 0 */ - break; - } - } - } + copy_palette(cm, &This->gif->SavedImages[This->current_frame].Extensions, count, colors); return IWICPalette_InitializeCustom(palette, colors, count); }
1
0
0
0
Alexandre Julliard : ver: Use nameless unions/structs.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 70a6ac07bf5e353d55500a722c255f937c1fa35d URL:
https://gitlab.winehq.org/wine/wine/-/commit/70a6ac07bf5e353d55500a722c255f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 18 19:56:36 2023 +0200 ver: Use nameless unions/structs. --- dlls/ver.dll16/version.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/ver.dll16/version.c b/dlls/ver.dll16/version.c index 6dfbc55c33b..0a16646c740 100644 --- a/dlls/ver.dll16/version.c +++ b/dlls/ver.dll16/version.c @@ -25,8 +25,6 @@ #include <string.h> #include <sys/types.h> -#define NONAMELESSUNION -#define NONAMELESSSTRUCT #include "windef.h" #include "wine/winbase16.h" #include "winternl.h" @@ -55,9 +53,9 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_id( const IMAGE_RESOURCE_DI while (min <= max) { pos = (min + max) / 2; - if (entry[pos].u.Id == id) - return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry[pos].u2.s2.OffsetToDirectory); - if (entry[pos].u.Id > id) max = pos - 1; + if (entry[pos].Id == id) + return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry[pos].OffsetToDirectory); + if (entry[pos].Id > id) max = pos - 1; else min = pos + 1; } return NULL; @@ -76,7 +74,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_default( const IMAGE_RESOURCE_ const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry; entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1); - return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry->u2.s2.OffsetToDirectory); + return (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry->OffsetToDirectory); } @@ -114,11 +112,11 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_ while (min <= max) { pos = (min + max) / 2; - str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const char *)root + entry[pos].u.s.NameOffset); + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const char *)root + entry[pos].NameOffset); res = wcsnicmp( nameW, str->NameString, str->Length ); if (!res && namelen == str->Length) { - ret = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry[pos].u2.s2.OffsetToDirectory); + ret = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + entry[pos].OffsetToDirectory); break; } if (res < 0) max = pos - 1;
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
87
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
Results per page:
10
25
50
100
200