Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
348449a4
Commit
348449a4
authored
Sep 13, 2005
by
Ge van Geldorp
Committed by
Alexandre Julliard
Sep 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save a few megabytes of memory by loading the default icon only once
into the image lists.
parent
7e4c88c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
iconcache.c
dlls/shell32/iconcache.c
+14
-6
No files found.
dlls/shell32/iconcache.c
View file @
348449a4
...
...
@@ -351,7 +351,17 @@ INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags )
if
(
INVALID_INDEX
==
index
)
{
ret
=
SIC_LoadIcon
(
sSourceFile
,
dwSourceIndex
,
dwFlags
);
if
(
0
==
strcmpiW
(
sSourceFile
,
swShell32Name
)
&&
-
IDI_SHELL_MY_DOCUMENTS
<=
dwSourceIndex
&&
dwSourceIndex
<
IDI_SHELL_MY_DOCUMENTS
)
{
/* Return default icon for icons not present in shell32 */
ret
=
0
;
}
else
{
ret
=
SIC_LoadIcon
(
sSourceFile
,
dwSourceIndex
,
dwFlags
);
}
}
else
{
...
...
@@ -404,13 +414,11 @@ BOOL SIC_Initialize(void)
hSm
=
(
HICON
)
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
index
),
IMAGE_ICON
,
cx_small
,
cy_small
,
LR_SHARED
);
hLg
=
(
HICON
)
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
index
),
IMAGE_ICON
,
cx_large
,
cy_large
,
LR_SHARED
);
if
(
!
hSm
)
if
(
hSm
)
{
hSm
=
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
1
),
IMAGE_ICON
,
cx_small
,
cy_small
,
LR_SHARED
);
hLg
=
LoadImageA
(
shell32_hInstance
,
MAKEINTRESOURCEA
(
1
),
IMAGE_ICON
,
cx_large
,
cy_large
,
LR_SHARED
);
SIC_IconAppend
(
swShell32Name
,
index
-
1
,
hSm
,
hLg
,
0
);
SIC_IconAppend
(
swShell32Name
,
-
index
,
hSm
,
hLg
,
0
);
}
SIC_IconAppend
(
swShell32Name
,
index
-
1
,
hSm
,
hLg
,
0
);
SIC_IconAppend
(
swShell32Name
,
-
index
,
hSm
,
hLg
,
0
);
}
TRACE
(
"hIconSmall=%p hIconBig=%p
\n
"
,
ShellSmallIconList
,
ShellBigIconList
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment