Module: wine Branch: master Commit: 77b75ca14b960f8b36134f0e6e9ad1786f97f296 URL: http://source.winehq.org/git/wine.git/?a=commit;h=77b75ca14b960f8b36134f0e6e...
Author: Mark Harmstone hellas@burntcomma.com Date: Sat Aug 1 15:40:05 2015 +0100
shell32: Don't hardcode icon sizes in SIC_LoadIcon.
---
dlls/shell32/iconcache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c index b294908..4549d5b 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -310,8 +310,10 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags) HICON hiconLargeShortcut; HICON hiconSmallShortcut;
- PrivateExtractIconsW( sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, 0, 1, 0 ); - PrivateExtractIconsW( sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, 0, 1, 0 ); + PrivateExtractIconsW( sSourceFile, dwSourceIndex, GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), &hiconLarge, 0, 1, 0 ); + PrivateExtractIconsW( sSourceFile, dwSourceIndex, GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), &hiconSmall, 0, 1, 0 );
if ( !hiconLarge || !hiconSmall) {