Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
711e1ba0
Commit
711e1ba0
authored
Apr 29, 2003
by
Maxime Bellengé
Committed by
Alexandre Julliard
Apr 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix some indentation.
- Fix the loading of icon resources.
parent
6dca3ecc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
cursoricon.c
windows/cursoricon.c
+12
-12
No files found.
windows/cursoricon.c
View file @
711e1ba0
...
...
@@ -24,7 +24,7 @@
/*
* Theory:
*
* http://
www.microsoft.com/win32dev/ui/icons.htm
* http://
msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_icons.asp
*
* Cursors and icons are stored in a global heap block, with the
* following layout:
...
...
@@ -309,30 +309,30 @@ static CURSORICONDIRENTRY *CURSORICON_FindBestIcon( CURSORICONDIR *dir, int widt
iTotalDiff
=
0xFFFFFFFF
;
iColorDiff
=
0xFFFFFFFF
;
for
(
i
=
0
,
entry
=
&
dir
->
idEntries
[
0
];
i
<
dir
->
idCount
;
i
++
,
entry
++
)
{
iTempXDiff
=
abs
(
width
-
entry
->
ResInfo
.
icon
.
bWidth
);
iTempYDiff
=
abs
(
height
-
entry
->
ResInfo
.
icon
.
bHeight
);
{
iTempXDiff
=
abs
(
width
-
entry
->
ResInfo
.
icon
.
bWidth
);
iTempYDiff
=
abs
(
height
-
entry
->
ResInfo
.
icon
.
bHeight
);
if
(
iTotalDiff
>
(
iTempXDiff
+
iTempYDiff
))
{
iXDiff
=
iTempXDiff
;
iYDiff
=
iTempYDiff
;
iTotalDiff
=
iXDiff
+
iYDiff
;
}
iTotalDiff
=
iXDiff
+
iYDiff
;
}
}
/* Find Best Colors for Best Fit */
for
(
i
=
0
,
entry
=
&
dir
->
idEntries
[
0
];
i
<
dir
->
idCount
;
i
++
,
entry
++
)
{
{
if
(
abs
(
width
-
entry
->
ResInfo
.
icon
.
bWidth
)
==
iXDiff
&&
abs
(
height
-
entry
->
ResInfo
.
icon
.
bHeight
)
==
iYDiff
)
abs
(
height
-
entry
->
ResInfo
.
icon
.
bHeight
)
==
iYDiff
)
{
iTempColorDiff
=
abs
(
colors
-
entry
->
ResInfo
.
icon
.
bColorCount
);
iTempColorDiff
=
abs
(
colors
-
(
1
<<
entry
->
wBitCount
)
);
if
(
iColorDiff
>
iTempColorDiff
)
{
bestEntry
=
entry
;
{
bestEntry
=
entry
;
iColorDiff
=
iTempColorDiff
;
}
}
}
}
...
...
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