mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Updated shell32-IconCache patchset
Fixed compile warning.
This commit is contained in:
parent
52d70e2ee4
commit
03c0de0368
@ -1,4 +1,4 @@
|
||||
From e4e08d2ff648f1021d9833f7ea986c42dfc642ad Mon Sep 17 00:00:00 2001
|
||||
From 3814dcc3cbbb1ffde8a208cf6612f8230703401a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
|
||||
Date: Fri, 30 Nov 2018 12:20:40 +0200
|
||||
Subject: [PATCH] shell32/iconcache: Generate icons from available icons if
|
||||
@ -19,11 +19,11 @@ smaller icons are only picked if no other available icon is larger).
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45696
|
||||
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
|
||||
---
|
||||
dlls/shell32/iconcache.c | 72 +++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 57 insertions(+), 15 deletions(-)
|
||||
dlls/shell32/iconcache.c | 75 ++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 60 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
|
||||
index 1c61374a732..a1c91f4785e 100644
|
||||
index e3ae2499fe9..f60787406c4 100644
|
||||
--- a/dlls/shell32/iconcache.c
|
||||
+++ b/dlls/shell32/iconcache.c
|
||||
@@ -21,6 +21,7 @@
|
||||
@ -34,7 +34,7 @@ index 1c61374a732..a1c91f4785e 100644
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
@@ -335,17 +336,6 @@ static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons
|
||||
@@ -333,17 +334,6 @@ static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ index 1c61374a732..a1c91f4785e 100644
|
||||
/****************************************************************************
|
||||
* SIC_LoadIcon [internal]
|
||||
*
|
||||
@@ -356,15 +346,67 @@ static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags)
|
||||
@@ -354,15 +344,70 @@ static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags)
|
||||
{
|
||||
HICON hicons[ARRAY_SIZE(shell_imagelists)] = { 0 };
|
||||
HICON hshortcuts[ARRAY_SIZE(hicons)] = { 0 };
|
||||
@ -60,6 +60,7 @@ index 1c61374a732..a1c91f4785e 100644
|
||||
unsigned int i;
|
||||
- SIZE size;
|
||||
INT ret = -1;
|
||||
+ INT x, y;
|
||||
|
||||
+ /* Keep track of the sizes in case any icon fails to get extracted */
|
||||
for (i = 0; i < ARRAY_SIZE(hicons); i++)
|
||||
@ -67,7 +68,9 @@ index 1c61374a732..a1c91f4785e 100644
|
||||
- if (!get_imagelist_icon_size( i, &size ) ||
|
||||
- !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));
|
||||
+ ImageList_GetIconSize(shell_imagelists[i], &size[i].cx, &size[i].cy);
|
||||
+ ImageList_GetIconSize(shell_imagelists[i], &x, &y);
|
||||
+ size[i].cx = x;
|
||||
+ size[i].cy = y;
|
||||
+ PrivateExtractIconsW(sourcefile, index, size[i].cx, size[i].cy, &hicons[i], 0, 1, 0);
|
||||
+ }
|
||||
+
|
||||
@ -125,5 +128,5 @@ index 1c61374a732..a1c91f4785e 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
2.43.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user