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 2018
----- 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
785 discussions
Start a n
N
ew thread
Matteo Bruni : d3dx9/tests: Improve a few ok() messages.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 50453644f63a6a0a5ebeb4edea5206f5d3c3b29e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=50453644f63a6a0a5ebeb4ed…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Mar 20 23:37:27 2018 +0100 d3dx9/tests: Improve a few ok() messages. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/effect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index ced6c8e..b7e2d72 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -5374,13 +5374,13 @@ static void test_effect_commitchanges(IDirect3DDevice9 *device) ok(hr == D3D_OK, "Got result %#x, i %u, j %u.\n", hr, i, j); } param = effect->lpVtbl->GetParameterByName(effect, NULL, check_op_parameters[i].param_name); - ok(!!param, "GetParameterByName failed.\n"); + ok(!!param, "Failed to get parameter (test %u).\n", i); hr = effect->lpVtbl->GetValue(effect, param, &fvect, sizeof(fvect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Failed to get parameter value, hr %#x (test %u).\n", hr, i); hr = effect->lpVtbl->SetValue(effect, param, &fvect, sizeof(fvect)); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Failed to set parameter value, hr %#x (test %u).\n", hr, i); hr = effect->lpVtbl->CommitChanges(effect); - ok(hr == D3D_OK, "Got result %#x.\n", hr); + ok(hr == D3D_OK, "Failed to commit changes, hr %#x (test %u).\n", hr, i); test_effect_preshader_op_results(device, check_op_parameters[i].state_updated, check_op_parameters[i].param_name);
1
0
0
0
Matteo Bruni : d3dx9: Introduce a parameter rbtree to speed up get_parameter_by_name().
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: f335932a81bc220d4c8e8944521f9cd2c85346ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f335932a81bc220d4c8e8944…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Mar 20 23:37:26 2018 +0100 d3dx9: Introduce a parameter rbtree to speed up get_parameter_by_name(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/d3dx9_private.h | 12 ++++ dlls/d3dx9_36/effect.c | 156 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 155 insertions(+), 13 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f335932a81bc220d4c8e…
1
0
0
0
Gijs Vermeulen : avifil32: Introduce ARRAY_SIZE macro.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 42a82726baf397081584d4b02293a98181f7a3e6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42a82726baf397081584d4b0…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Wed Mar 21 02:59:12 2018 +0100 avifil32: Introduce ARRAY_SIZE macro. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/avifil32/api.c | 12 ++++++------ dlls/avifil32/avifile.c | 8 ++++---- dlls/avifil32/avifile_private.h | 2 ++ dlls/avifil32/wavfile.c | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 5c15c1f..63a3530 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -156,7 +156,7 @@ static BOOL AVIFILE_GetFileHandlerByExtension(LPCWSTR szFile, LPCLSID lpclsid) CHAR szRegKey[25]; CHAR szValue[100]; LPWSTR szExt = strrchrW(szFile, '.'); - LONG len = sizeof(szValue) / sizeof(szValue[0]); + LONG len = ARRAY_SIZE(szValue); if (szExt == NULL) return FALSE; @@ -371,7 +371,7 @@ HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE pfile, PAVISTREAM *ppavi, /* Only the szName at the end is different */ memcpy(&psiw, psi, sizeof(*psi) - sizeof(psi->szName)); MultiByteToWideChar(CP_ACP, 0, psi->szName, -1, psiw.szName, - sizeof(psiw.szName) / sizeof(psiw.szName[0])); + ARRAY_SIZE(psiw.szName)); return IAVIFile_CreateStream(pfile, ppavi, &psiw); } @@ -1035,7 +1035,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) HeapFree(GetProcessHeap(), 0, lp); return AVIERR_ERROR; } - for (n = 0;RegEnumKeyW(hKey, n, szFileExt, sizeof(szFileExt)/sizeof(szFileExt[0])) == ERROR_SUCCESS;n++) { + for (n = 0;RegEnumKeyW(hKey, n, szFileExt, ARRAY_SIZE(szFileExt)) == ERROR_SUCCESS;n++) { WCHAR clsidW[40]; /* get CLSID to extension */ @@ -1300,7 +1300,7 @@ static void AVISaveOptionsUpdate(HWND hWnd) } else { LoadStringW(AVIFILE_hModule, IDS_UNCOMPRESSED, icinfo.szDescription, - sizeof(icinfo.szDescription)/sizeof(icinfo.szDescription[0])); + ARRAY_SIZE(icinfo.szDescription)); lstrcatW(szFormat, icinfo.szDescription); } } else if (sInfo.fccType == streamtypeAUDIO) { @@ -2160,7 +2160,7 @@ HRESULT WINAPI EditStreamSetNameA(PAVISTREAM pstream, LPCSTR szName) return hres; memset(asia.szName, 0, sizeof(asia.szName)); - lstrcpynA(asia.szName, szName, sizeof(asia.szName)/sizeof(asia.szName[0])); + lstrcpynA(asia.szName, szName, ARRAY_SIZE(asia.szName)); return EditStreamSetInfoA(pstream, &asia, sizeof(asia)); } @@ -2185,7 +2185,7 @@ HRESULT WINAPI EditStreamSetNameW(PAVISTREAM pstream, LPCWSTR szName) return hres; memset(asiw.szName, 0, sizeof(asiw.szName)); - lstrcpynW(asiw.szName, szName, sizeof(asiw.szName)/sizeof(asiw.szName[0])); + lstrcpynW(asiw.szName, szName, ARRAY_SIZE(asiw.szName)); return EditStreamSetInfoW(pstream, &asiw, sizeof(asiw)); } diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index 7a4caaa..33c28b1 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -1641,7 +1641,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) This->fInfo.dwWidth = MainAVIHdr.dwWidth; This->fInfo.dwHeight = MainAVIHdr.dwHeight; LoadStringW(AVIFILE_hModule, IDS_AVIFILETYPE, This->fInfo.szFileType, - sizeof(This->fInfo.szFileType)/sizeof(This->fInfo.szFileType[0])); + ARRAY_SIZE(This->fInfo.szFileType)); /* go back to into header list */ if (mmioAscend(This->hmmio, &ck, 0) != S_OK) @@ -1751,9 +1751,9 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) /* generate description for stream like "filename.avi Type #n" */ if (streamHdr.fccType == streamtypeVIDEO) - LoadStringW(AVIFILE_hModule, IDS_VIDEO, szType, sizeof(szType)/sizeof(szType[0])); + LoadStringW(AVIFILE_hModule, IDS_VIDEO, szType, ARRAY_SIZE(szType)); else if (streamHdr.fccType == streamtypeAUDIO) - LoadStringW(AVIFILE_hModule, IDS_AUDIO, szType, sizeof(szType)/sizeof(szType[0])); + LoadStringW(AVIFILE_hModule, IDS_AUDIO, szType, ARRAY_SIZE(szType)); else wsprintfW(szType, streamTypeFmt, (char*)&streamHdr.fccType); @@ -1784,7 +1784,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) } MultiByteToWideChar(CP_ACP, 0, str, -1, pStream->sInfo.szName, - sizeof(pStream->sInfo.szName)/sizeof(pStream->sInfo.szName[0])); + ARRAY_SIZE(pStream->sInfo.szName)); HeapFree(GetProcessHeap(), 0, str); } diff --git a/dlls/avifil32/avifile_private.h b/dlls/avifil32/avifile_private.h index 4bf11f4..83e87ea 100644 --- a/dlls/avifil32/avifile_private.h +++ b/dlls/avifil32/avifile_private.h @@ -22,6 +22,8 @@ #include <windef.h> #include <winuser.h> +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + #ifndef MAX_AVISTREAMS #define MAX_AVISTREAMS 8 #endif diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index d2d203b..6294ecd 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -522,9 +522,9 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, LPCOLESTR pszFile memset(& This->sInfo, 0, sizeof(This->sInfo)); LoadStringW(AVIFILE_hModule, IDS_WAVEFILETYPE, This->fInfo.szFileType, - sizeof(This->fInfo.szFileType)/sizeof(This->fInfo.szFileType[0])); + ARRAY_SIZE(This->fInfo.szFileType)); if (LoadStringW(AVIFILE_hModule, IDS_WAVESTREAMFORMAT, - wszStreamFmt, sizeof(wszStreamFmt)/sizeof(wszStreamFmt[0])) > 0) { + wszStreamFmt, ARRAY_SIZE(wszStreamFmt)) > 0) { wsprintfW(This->sInfo.szName, wszStreamFmt, AVIFILE_BasenameW(This->szFileName)); }
1
0
0
0
Gijs Vermeulen : appwiz.cpl: Introduce ARRAY_SIZE macro.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 0aff523d7134b16d9a1de382f8495d7cda26861d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0aff523d7134b16d9a1de382…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Wed Mar 21 02:59:11 2018 +0100 appwiz.cpl: Introduce ARRAY_SIZE macro. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/appwiz.cpl/appwiz.c | 24 ++++++++++++------------ dlls/appwiz.cpl/appwiz.h | 2 ++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c index 3807555..dae9df9 100644 --- a/dlls/appwiz.cpl/appwiz.c +++ b/dlls/appwiz.cpl/appwiz.c @@ -161,7 +161,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root) APPINFO *info = NULL; LPWSTR iconPtr; - sizeOfSubKeyName = sizeof(subKeyName) / sizeof(subKeyName[0]); + sizeOfSubKeyName = ARRAY_SIZE(subKeyName); for (i = 0; RegEnumKeyExW(root, i, subKeyName, &sizeOfSubKeyName, NULL, NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS; ++i) @@ -172,7 +172,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root) && dwType == REG_DWORD && value == 1) { RegCloseKey(hkeyApp); - sizeOfSubKeyName = sizeof(subKeyName) / sizeof(subKeyName[0]); + sizeOfSubKeyName = ARRAY_SIZE(subKeyName); continue; } displen = 0; @@ -197,7 +197,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root) else { RegCloseKey(hkeyApp); - sizeOfSubKeyName = sizeof(subKeyName) / sizeof(subKeyName[0]); + sizeOfSubKeyName = ARRAY_SIZE(subKeyName); continue; } @@ -308,7 +308,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root) } RegCloseKey(hkeyApp); - sizeOfSubKeyName = sizeof(subKeyName) / sizeof(subKeyName[0]); + sizeOfSubKeyName = ARRAY_SIZE(subKeyName); } return TRUE; @@ -501,7 +501,7 @@ static void UninstallProgram(int id, DWORD button) BOOL res; LoadStringW(hInst, IDS_UNINSTALL_FAILED, sUninstallFailed, - sizeof(sUninstallFailed) / sizeof(sUninstallFailed[0])); + ARRAY_SIZE(sUninstallFailed)); LIST_FOR_EACH_ENTRY( iter, &app_list, APPINFO, entry ) { @@ -617,7 +617,7 @@ static INT_PTR CALLBACK SupportInfoDlgProc(HWND hWnd, UINT msg, WPARAM wParam, L /* Load our "not specified" string */ LoadStringW(hInst, IDS_NOT_SPECIFIED, notfound, - sizeof(notfound) / sizeof(notfound[0])); + ARRAY_SIZE(notfound)); /* Update the data for items already read into the structure */ SetInfoDialogText(NULL, iter->publisher, notfound, hWnd, @@ -712,7 +712,7 @@ static BOOL AddListViewColumns(HWND hWnd) lvc.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH; /* Add the columns */ - for (i = 0; i < sizeof(columns) / sizeof(columns[0]); i++) + for (i = 0; i < ARRAY_SIZE(columns); i++) { lvc.iSubItem = i; lvc.pszText = buf; @@ -721,7 +721,7 @@ static BOOL AddListViewColumns(HWND hWnd) lvc.cx = columns[i].width; lvc.fmt = columns[i].fmt; - LoadStringW(hInst, columns[i].title, buf, sizeof(buf) / sizeof(buf[0])); + LoadStringW(hInst, columns[i].title, buf, ARRAY_SIZE(buf)); if (ListView_InsertColumnW(hWnd, i, &lvc) == -1) return FALSE; @@ -938,10 +938,10 @@ static void StartApplet(HWND hWnd) WCHAR tab_title[MAX_STRING_LEN], app_title[MAX_STRING_LEN]; /* Load the strings we will use */ - LoadStringW(hInst, IDS_TAB1_TITLE, tab_title, sizeof(tab_title) / sizeof(tab_title[0])); - LoadStringW(hInst, IDS_CPL_TITLE, app_title, sizeof(app_title) / sizeof(app_title[0])); - LoadStringW(hInst, IDS_REMOVE, btnRemove, sizeof(btnRemove) / sizeof(btnRemove[0])); - LoadStringW(hInst, IDS_MODIFY_REMOVE, btnModifyRemove, sizeof(btnModifyRemove) / sizeof(btnModifyRemove[0])); + LoadStringW(hInst, IDS_TAB1_TITLE, tab_title, ARRAY_SIZE(tab_title)); + LoadStringW(hInst, IDS_CPL_TITLE, app_title, ARRAY_SIZE(app_title)); + LoadStringW(hInst, IDS_REMOVE, btnRemove, ARRAY_SIZE(btnRemove)); + LoadStringW(hInst, IDS_MODIFY_REMOVE, btnModifyRemove, ARRAY_SIZE(btnModifyRemove)); /* Fill out the PROPSHEETPAGE */ psp.dwSize = sizeof (PROPSHEETPAGEW); diff --git a/dlls/appwiz.cpl/appwiz.h b/dlls/appwiz.cpl/appwiz.h index 2165ce1..d18d93a 100644 --- a/dlls/appwiz.cpl/appwiz.h +++ b/dlls/appwiz.cpl/appwiz.h @@ -19,6 +19,8 @@ #include "wine/heap.h" #include "wine/unicode.h" +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + typedef enum { ADDON_GECKO, ADDON_MONO
1
0
0
0
Józef Kucia : winex11: Print ERR() message when Wine was built without Vulkan support.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 107e7c78fc239f90130887e1b58678d9c38ff6f4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=107e7c78fc239f90130887e1…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Mar 21 10:03:43 2018 +0100 winex11: Print ERR() message when Wine was built without Vulkan support. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/vulkan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index 0586096..27ff722 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -533,6 +533,7 @@ const struct vulkan_funcs *get_vulkan_driver(UINT version) const struct vulkan_funcs *get_vulkan_driver(UINT version) { + ERR("Wine was built without Vulkan support.\n"); return NULL; }
1
0
0
0
Nikolay Sivov : shell32: Add SHIL_JUMBO list.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: e51c9b47b8bc9f8518084c0896d0eb451c316260 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e51c9b47b8bc9f8518084c08…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 21 09:27:16 2018 +0300 shell32: Add SHIL_JUMBO list. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/iconcache.c | 10 +++++----- dlls/shell32/tests/shelllink.c | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index f26ff0e..d55bde9 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -61,7 +61,7 @@ typedef struct static HDPA sic_hdpa; static INIT_ONCE sic_init_once = INIT_ONCE_STATIC_INIT; -static HIMAGELIST shell_imagelists[SHIL_SYSSMALL+1]; +static HIMAGELIST shell_imagelists[SHIL_LAST+1]; static CRITICAL_SECTION SHELL32_SicCS; static CRITICAL_SECTION_DEBUG critsect_debug = @@ -454,6 +454,7 @@ static BOOL WINAPI SIC_Initialize( INIT_ONCE *once, void *param, void **context sizes[SHIL_EXTRALARGE].cy = (GetSystemMetrics( SM_CYICON ) * 3) / 2; sizes[SHIL_SYSSMALL].cx = GetSystemMetrics( SM_CXSMICON ); sizes[SHIL_SYSSMALL].cy = GetSystemMetrics( SM_CYSMICON ); + sizes[SHIL_JUMBO].cx = sizes[SHIL_JUMBO].cy = 256; TRACE("large %dx%d small %dx%d\n", sizes[SHIL_LARGE].cx, sizes[SHIL_LARGE].cy, sizes[SHIL_SMALL].cx, sizes[SHIL_SMALL].cy); @@ -1039,11 +1040,10 @@ HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO */ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) { - if (iImageList < 0 || iImageList > SHIL_SYSSMALL) - { - FIXME("Unsupported image list %i requested\n", iImageList); + TRACE("(%d, %s, %p)\n", iImageList, debugstr_guid(riid), ppv); + + if (iImageList < 0 || iImageList > SHIL_LAST) return E_FAIL; - } InitOnceExecuteOnce( &sic_init_once, SIC_Initialize, NULL, NULL ); return HIMAGELIST_QueryInterface(shell_imagelists[iImageList], riid, ppv); diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 2486c96..1e07090 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -1417,9 +1417,7 @@ static void test_SHGetImageList(void) for (i = 0; i <= SHIL_LAST; i++) { hr = SHGetImageList( i, &IID_IImageList, (void **)&list ); - todo_wine_if(i == SHIL_JUMBO) - ok( hr == S_OK || - broken( i == SHIL_JUMBO && hr == E_INVALIDARG ), /* XP and 2003 */ + ok( hr == S_OK || broken( i == SHIL_JUMBO && hr == E_INVALIDARG ), /* XP and 2003 */ "%d: got %08x\n", i, hr ); if (FAILED(hr)) continue; IImageList_GetIconSize( list, &width, &height );
1
0
0
0
Nikolay Sivov : shell32: Add support for SHIL_SYSSMALL list.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 7db6885da74d183104db52e9bd9065ebdf5e4e11 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7db6885da74d183104db52e9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 21 09:27:15 2018 +0300 shell32: Add support for SHIL_SYSSMALL list. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/iconcache.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index c6baf60..f26ff0e 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -61,7 +61,7 @@ typedef struct static HDPA sic_hdpa; static INIT_ONCE sic_init_once = INIT_ONCE_STATIC_INIT; -static HIMAGELIST shell_imagelists[SHIL_EXTRALARGE+1]; +static HIMAGELIST shell_imagelists[SHIL_SYSSMALL+1]; static CRITICAL_SECTION SHELL32_SicCS; static CRITICAL_SECTION_DEBUG critsect_debug = @@ -452,6 +452,8 @@ static BOOL WINAPI SIC_Initialize( INIT_ONCE *once, void *param, void **context sizes[SHIL_EXTRALARGE].cx = (GetSystemMetrics( SM_CXICON ) * 3) / 2; sizes[SHIL_EXTRALARGE].cy = (GetSystemMetrics( SM_CYICON ) * 3) / 2; + sizes[SHIL_SYSSMALL].cx = GetSystemMetrics( SM_CXSMICON ); + sizes[SHIL_SYSSMALL].cy = GetSystemMetrics( SM_CYSMICON ); TRACE("large %dx%d small %dx%d\n", sizes[SHIL_LARGE].cx, sizes[SHIL_LARGE].cy, sizes[SHIL_SMALL].cx, sizes[SHIL_SMALL].cy); @@ -1044,9 +1046,5 @@ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) } InitOnceExecuteOnce( &sic_init_once, SIC_Initialize, NULL, NULL ); - - if (iImageList == SHIL_SYSSMALL) - iImageList = SHIL_SMALL; - return HIMAGELIST_QueryInterface(shell_imagelists[iImageList], riid, ppv); }
1
0
0
0
Nikolay Sivov : shell32: Add support for SHIL_EXTRALARGE list.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 479dc1d8c3188fae7d9de2a8c43f52901243e1af URL:
https://source.winehq.org/git/wine.git/?a=commit;h=479dc1d8c3188fae7d9de2a8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 21 09:27:14 2018 +0300 shell32: Add support for SHIL_EXTRALARGE list. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/iconcache.c | 87 +++++++++++++++++++++--------------------- dlls/shell32/tests/shelllink.c | 2 +- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index 23e8203..c6baf60 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -61,7 +61,7 @@ typedef struct static HDPA sic_hdpa; static INIT_ONCE sic_init_once = INIT_ONCE_STATIC_INIT; -static HIMAGELIST shell_imagelists[SHIL_SMALL+1]; +static HIMAGELIST shell_imagelists[SHIL_EXTRALARGE+1]; static CRITICAL_SECTION SHELL32_SicCS; static CRITICAL_SECTION_DEBUG critsect_debug = @@ -347,7 +347,7 @@ static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons static BOOL get_imagelist_icon_size(int list, SIZE *size) { - if (list < SHIL_LARGE || list > SHIL_SMALL) return FALSE; + if (list < 0 || list >= ARRAY_SIZE(shell_imagelists)) return FALSE; return ImageList_GetIconSize( shell_imagelists[list], &size->cx, &size->cy ); } @@ -360,7 +360,7 @@ static BOOL get_imagelist_icon_size(int list, SIZE *size) */ static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags) { - HICON hicons[SHIL_SMALL+1] = { 0 }; + HICON hicons[ARRAY_SIZE(shell_imagelists)] = { 0 }; HICON hshortcuts[ARRAY_SIZE(hicons)] = { 0 }; unsigned int i; SIZE size; @@ -431,59 +431,61 @@ static int get_shell_icon_size(void) */ static BOOL WINAPI SIC_Initialize( INIT_ONCE *once, void *param, void **context ) { - HICON hicons[SHIL_SMALL+1]; - int cx_small, cy_small; - int cx_large, cy_large; - unsigned int i; + HICON hicons[ARRAY_SIZE(shell_imagelists)]; + SIZE sizes[ARRAY_SIZE(shell_imagelists)]; + BOOL failed = FALSE; + unsigned int i; - if (!IsProcessDPIAware()) - { - cx_large = cy_large = get_shell_icon_size(); - cx_small = GetSystemMetrics( SM_CXSMICON ); - cy_small = GetSystemMetrics( SM_CYSMICON ); - } - else - { - cx_large = GetSystemMetrics( SM_CXICON ); - cy_large = GetSystemMetrics( SM_CYICON ); - cx_small = cx_large / 2; - cy_small = cy_large / 2; - } + if (!IsProcessDPIAware()) + { + sizes[SHIL_LARGE].cx = sizes[SHIL_LARGE].cy = get_shell_icon_size(); + sizes[SHIL_SMALL].cx = GetSystemMetrics( SM_CXSMICON ); + sizes[SHIL_SMALL].cy = GetSystemMetrics( SM_CYSMICON ); + } + else + { + sizes[SHIL_LARGE].cx = GetSystemMetrics( SM_CXICON ); + sizes[SHIL_LARGE].cy = GetSystemMetrics( SM_CYICON ); + sizes[SHIL_SMALL].cx = sizes[SHIL_LARGE].cx / 2; + sizes[SHIL_SMALL].cy = sizes[SHIL_LARGE].cy / 2; + } - TRACE("large %dx%d small %dx%d\n", cx_large, cy_large, cx_small, cx_small); + sizes[SHIL_EXTRALARGE].cx = (GetSystemMetrics( SM_CXICON ) * 3) / 2; + sizes[SHIL_EXTRALARGE].cy = (GetSystemMetrics( SM_CYICON ) * 3) / 2; - sic_hdpa = DPA_Create(16); + TRACE("large %dx%d small %dx%d\n", sizes[SHIL_LARGE].cx, sizes[SHIL_LARGE].cy, sizes[SHIL_SMALL].cx, sizes[SHIL_SMALL].cy); - if (!sic_hdpa) - { - return(FALSE); - } - - shell_imagelists[SHIL_SMALL] = ImageList_Create(cx_small, cy_small, ILC_COLOR32 | ILC_MASK, 0, 0x20); - shell_imagelists[SHIL_LARGE] = ImageList_Create(cx_large, cy_large, ILC_COLOR32 | ILC_MASK, 0, 0x20); + sic_hdpa = DPA_Create(16); + if (!sic_hdpa) + return(FALSE); - for (i = 0; i < ARRAY_SIZE(shell_imagelists); i++) - ImageList_SetBkColor(shell_imagelists[i], CLR_NONE); + for (i = 0; i < ARRAY_SIZE(shell_imagelists); i++) + { + shell_imagelists[i] = ImageList_Create(sizes[i].cx, sizes[i].cy, ILC_COLOR32 | ILC_MASK, 0, 0x20); + ImageList_SetBkColor(shell_imagelists[i], CLR_NONE); /* Load the document icon, which is used as the default if an icon isn't found. */ - hicons[SHIL_SMALL] = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), - IMAGE_ICON, cx_small, cy_small, LR_SHARED); - hicons[SHIL_LARGE] = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), - IMAGE_ICON, cx_large, cy_large, LR_SHARED); - - if (!hicons[SHIL_SMALL] || !hicons[SHIL_LARGE]) + if (!(hicons[i] = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), + IMAGE_ICON, sizes[i].cx, sizes[i].cy, LR_SHARED))) { - FIXME("Failed to load IDI_SHELL_DOCUMENT icon!\n"); - return FALSE; + failed = TRUE; } + } - SIC_IconAppend (swShell32Name, IDI_SHELL_DOCUMENT-1, hicons, 0); - SIC_IconAppend (swShell32Name, -IDI_SHELL_DOCUMENT, hicons, 0); + if (failed) + { + FIXME("Failed to load IDI_SHELL_DOCUMENT icon!\n"); + return FALSE; + } + + SIC_IconAppend(swShell32Name, IDI_SHELL_DOCUMENT - 1, hicons, 0); + SIC_IconAppend(swShell32Name, -IDI_SHELL_DOCUMENT, hicons, 0); TRACE("small list=%p, large list=%p\n", shell_imagelists[SHIL_SMALL], shell_imagelists[SHIL_LARGE]); return TRUE; } + /************************************************************************* * SIC_Destroy * @@ -1035,8 +1037,7 @@ HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO */ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) { - /* Wine currently only maintains large and small image lists */ - if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL)) + if (iImageList < 0 || iImageList > SHIL_SYSSMALL) { FIXME("Unsupported image list %i requested\n", iImageList); return E_FAIL; diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index a9288cc..2486c96 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -1417,7 +1417,7 @@ static void test_SHGetImageList(void) for (i = 0; i <= SHIL_LAST; i++) { hr = SHGetImageList( i, &IID_IImageList, (void **)&list ); - todo_wine_if(i == SHIL_EXTRALARGE || i == SHIL_JUMBO) + todo_wine_if(i == SHIL_JUMBO) ok( hr == S_OK || broken( i == SHIL_JUMBO && hr == E_INVALIDARG ), /* XP and 2003 */ "%d: got %08x\n", i, hr );
1
0
0
0
Nikolay Sivov : shell32: Move SHGetImageList() to related source file.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 0075b05adff17a1ebcd4cfcd5addd86211004bce URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0075b05adff17a1ebcd4cfcd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 21 09:27:13 2018 +0300 shell32: Move SHGetImageList() to related source file. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/iconcache.c | 27 +++++++++++++++++++++++++++ dlls/shell32/shellord.c | 28 ---------------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index e62e872..23e8203 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -1022,3 +1022,30 @@ HRESULT WINAPI SHGetStockIconInfo(SHSTOCKICONID id, UINT flags, SHSTOCKICONINFO return S_OK; } + +/************************************************************************* + * SHGetImageList (SHELL32.727) + * + * Returns a copy of a shell image list. + * + * NOTES + * Windows XP features 4 sizes of image list, and Vista 5. Wine currently + * only supports the traditional small and large image lists, so requests + * for the others will currently fail. + */ +HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) +{ + /* Wine currently only maintains large and small image lists */ + if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL)) + { + FIXME("Unsupported image list %i requested\n", iImageList); + return E_FAIL; + } + + InitOnceExecuteOnce( &sic_init_once, SIC_Initialize, NULL, NULL ); + + if (iImageList == SHIL_SYSSMALL) + iImageList = SHIL_SMALL; + + return HIMAGELIST_QueryInterface(shell_imagelists[iImageList], riid, ppv); +} diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 058e57e..6fc49dc 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -2133,31 +2133,3 @@ BOOL WINAPI LinkWindow_UnregisterClass(void) void WINAPI SHFlushSFCache(void) { } - -/************************************************************************* - * SHGetImageList (SHELL32.727) - * - * Returns a copy of a shell image list. - * - * NOTES - * Windows XP features 4 sizes of image list, and Vista 5. Wine currently - * only supports the traditional small and large image lists, so requests - * for the others will currently fail. - */ -HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) -{ - HIMAGELIST hLarge, hSmall; - HIMAGELIST hNew; - - /* Wine currently only maintains large and small image lists */ - if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL)) - { - FIXME("Unsupported image list %i requested\n", iImageList); - return E_FAIL; - } - - Shell_GetImageLists(&hLarge, &hSmall); - hNew = (iImageList == SHIL_LARGE) ? hLarge : hSmall; - - return HIMAGELIST_QueryInterface(hNew, riid, ppv); -}
1
0
0
0
Nikolay Sivov : shell32: Pass handle arrays between icon cache helpers.
by Alexandre Julliard
21 Mar '18
21 Mar '18
Module: wine Branch: master Commit: 09389c4bab525ebde63fca705d9a2d4fab0b2778 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=09389c4bab525ebde63fca70…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 21 09:27:12 2018 +0300 shell32: Pass handle arrays between icon cache helpers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/iconcache.c | 162 ++++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 79 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index 562f9b2..e62e872 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -298,50 +298,51 @@ fail: /***************************************************************************** * SIC_IconAppend [internal] - * - * NOTES - * appends an icon pair to the end of the cache */ -static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon, DWORD dwFlags) +static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons, DWORD flags) { - LPSIC_ENTRY lpsice; - INT ret, index, index1; - WCHAR path[MAX_PATH]; - TRACE("%s %i %p %p\n", debugstr_w(sSourceFile), dwSourceIndex, hSmallIcon ,hBigIcon); + INT ret, index, index1; + WCHAR path[MAX_PATH]; + SIC_ENTRY *entry; + unsigned int i; - lpsice = SHAlloc(sizeof(SIC_ENTRY)); + TRACE("%s %i %p %#x\n", debugstr_w(sourcefile), src_index, hicons, flags); - GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); - lpsice->sSourceFile = heap_alloc( (strlenW(path)+1)*sizeof(WCHAR) ); - strcpyW( lpsice->sSourceFile, path ); + entry = SHAlloc(sizeof(*entry)); - lpsice->dwSourceIndex = dwSourceIndex; - lpsice->dwFlags = dwFlags; + GetFullPathNameW(sourcefile, MAX_PATH, path, NULL); + entry->sSourceFile = heap_alloc( (strlenW(path)+1)*sizeof(WCHAR) ); + strcpyW( entry->sSourceFile, path ); - EnterCriticalSection(&SHELL32_SicCS); + entry->dwSourceIndex = src_index; + entry->dwFlags = flags; - index = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice); - if ( INVALID_INDEX == index ) - { - heap_free(lpsice->sSourceFile); - SHFree(lpsice); - ret = INVALID_INDEX; - } - else - { - index = ImageList_AddIcon(shell_imagelists[SHIL_SMALL], hSmallIcon); - index1 = ImageList_AddIcon(shell_imagelists[SHIL_LARGE], hBigIcon); + EnterCriticalSection(&SHELL32_SicCS); - if (index!=index1) - { - FIXME("iconlists out of sync 0x%x 0x%x\n", index, index1); - } - lpsice->dwListIndex = index; - ret = lpsice->dwListIndex; - } + index = DPA_InsertPtr(sic_hdpa, 0x7fff, entry); + if ( INVALID_INDEX == index ) + { + heap_free(entry->sSourceFile); + SHFree(entry); + ret = INVALID_INDEX; + } + else + { + index = -1; + for (i = 0; i < ARRAY_SIZE(shell_imagelists); i++) + { + index1 = ImageList_AddIcon(shell_imagelists[i], hicons[i]); + if (index != -1 && index1 != index) + WARN("Imagelists out of sync, list %d.\n", i); + index = index1; + } - LeaveCriticalSection(&SHELL32_SicCS); - return ret; + entry->dwListIndex = index; + ret = entry->dwListIndex; + } + + LeaveCriticalSection(&SHELL32_SicCS); + return ret; } static BOOL get_imagelist_icon_size(int list, SIZE *size) @@ -355,52 +356,55 @@ static BOOL get_imagelist_icon_size(int list, SIZE *size) * SIC_LoadIcon [internal] * * NOTES - * gets small/big icon by number from a file + * gets icons by index from the file */ -static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD flags) +static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags) { - HICON hiconLarge=0; - HICON hiconSmall=0; - HICON hiconLargeShortcut; - HICON hiconSmallShortcut; - int ret; - SIZE size; - - get_imagelist_icon_size( SHIL_LARGE, &size ); - PrivateExtractIconsW( sSourceFile, dwSourceIndex, size.cx, size.cy, &hiconLarge, 0, 1, 0 ); - get_imagelist_icon_size( SHIL_SMALL, &size ); - PrivateExtractIconsW( sSourceFile, dwSourceIndex, size.cx, size.cy, &hiconSmall, 0, 1, 0 ); - - if ( !hiconLarge || !hiconSmall) - { - WARN("failure loading icon %i from %s (%p %p)\n", dwSourceIndex, debugstr_w(sSourceFile), hiconLarge, hiconSmall); - return -1; - } + HICON hicons[SHIL_SMALL+1] = { 0 }; + HICON hshortcuts[ARRAY_SIZE(hicons)] = { 0 }; + unsigned int i; + SIZE size; + int ret; + + for (i = 0; i < ARRAY_SIZE(hicons); i++) + { + get_imagelist_icon_size( i, &size ); + if (!PrivateExtractIconsW( sourcefile, index, size.cx, size.cy, &hicons[i], 0, 1, 0 )) + WARN("Failed to load icon %d from %s.\n", index, debugstr_w(sourcefile)); + } if (flags & GIL_FORSHORTCUT) { - hiconLargeShortcut = SIC_OverlayShortcutImage(hiconLarge, SHIL_LARGE); - hiconSmallShortcut = SIC_OverlayShortcutImage(hiconSmall, SHIL_SMALL); + BOOL failed = FALSE; - if (NULL != hiconLargeShortcut && NULL != hiconSmallShortcut) - { - DestroyIcon( hiconLarge ); - DestroyIcon( hiconSmall ); - hiconLarge = hiconLargeShortcut; - hiconSmall = hiconSmallShortcut; - } - else - { - WARN("Failed to create shortcut overlaid icons\n"); - if (NULL != hiconLargeShortcut) DestroyIcon(hiconLargeShortcut); - if (NULL != hiconSmallShortcut) DestroyIcon(hiconSmallShortcut); - flags &= ~ GIL_FORSHORTCUT; - } + for (i = 0; i < ARRAY_SIZE(hshortcuts); i++) + { + if (!(hshortcuts[i] = SIC_OverlayShortcutImage(hicons[i], i))) + { + WARN("Failed to create shortcut overlaid icons.\n"); + failed = TRUE; + } + } + + if (failed) + { + for (i = 0; i < ARRAY_SIZE(hshortcuts); i++) + DestroyIcon(hshortcuts[i]); + flags &= ~GIL_FORSHORTCUT; + } + else + { + for (i = 0; i < ARRAY_SIZE(hicons); i++) + { + DestroyIcon(hicons[i]); + hicons[i] = hshortcuts[i]; + } + } } - ret = SIC_IconAppend( sSourceFile, dwSourceIndex, hiconSmall, hiconLarge, flags ); - DestroyIcon( hiconLarge ); - DestroyIcon( hiconSmall ); + ret = SIC_IconAppend( sourcefile, index, hicons, flags ); + for (i = 0; i < ARRAY_SIZE(hicons); i++) + DestroyIcon(hicons[i]); return ret; } @@ -427,7 +431,7 @@ static int get_shell_icon_size(void) */ static BOOL WINAPI SIC_Initialize( INIT_ONCE *once, void *param, void **context ) { - HICON hSm, hLg; + HICON hicons[SHIL_SMALL+1]; int cx_small, cy_small; int cx_large, cy_large; unsigned int i; @@ -462,19 +466,19 @@ static BOOL WINAPI SIC_Initialize( INIT_ONCE *once, void *param, void **context ImageList_SetBkColor(shell_imagelists[i], CLR_NONE); /* Load the document icon, which is used as the default if an icon isn't found. */ - hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), + hicons[SHIL_SMALL] = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), IMAGE_ICON, cx_small, cy_small, LR_SHARED); - hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), + hicons[SHIL_LARGE] = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(IDI_SHELL_DOCUMENT), IMAGE_ICON, cx_large, cy_large, LR_SHARED); - if (!hSm || !hLg) + if (!hicons[SHIL_SMALL] || !hicons[SHIL_LARGE]) { FIXME("Failed to load IDI_SHELL_DOCUMENT icon!\n"); return FALSE; } - SIC_IconAppend (swShell32Name, IDI_SHELL_DOCUMENT-1, hSm, hLg, 0); - SIC_IconAppend (swShell32Name, -IDI_SHELL_DOCUMENT, hSm, hLg, 0); + SIC_IconAppend (swShell32Name, IDI_SHELL_DOCUMENT-1, hicons, 0); + SIC_IconAppend (swShell32Name, -IDI_SHELL_DOCUMENT, hicons, 0); TRACE("small list=%p, large list=%p\n", shell_imagelists[SHIL_SMALL], shell_imagelists[SHIL_LARGE]);
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
79
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
Results per page:
10
25
50
100
200