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
efe1c945
Commit
efe1c945
authored
May 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use the stored color and mask bitmaps instead of the raw bits in GetIconInfo.
parent
072d0b34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
29 deletions
+12
-29
cursoricon.c
dlls/user32/cursoricon.c
+12
-29
No files found.
dlls/user32/cursoricon.c
View file @
efe1c945
...
@@ -2049,47 +2049,30 @@ HICON WINAPI LoadIconA(HINSTANCE hInstance, LPCSTR name)
...
@@ -2049,47 +2049,30 @@ HICON WINAPI LoadIconA(HINSTANCE hInstance, LPCSTR name)
*/
*/
BOOL
WINAPI
GetIconInfo
(
HICON
hIcon
,
PICONINFO
iconinfo
)
BOOL
WINAPI
GetIconInfo
(
HICON
hIcon
,
PICONINFO
iconinfo
)
{
{
struct
cursoricon_object
*
ciconinfo
;
struct
cursoricon_object
*
ptr
;
INT
height
;
if
(
!
(
ciconinfo
=
get_icon_ptr
(
hIcon
)))
return
FALSE
;
if
(
!
(
ptr
=
get_icon_ptr
(
hIcon
)))
return
FALSE
;
TRACE
(
"%p => %dx%d, %d bpp
\n
"
,
hIcon
,
TRACE
(
"%p => %dx%d, %d bpp
\n
"
,
hIcon
,
ciconinfo
->
data
.
nWidth
,
ciconinfo
->
data
.
nHeight
,
ciconinfo
->
data
.
bBitsPerPixel
);
ptr
->
data
.
nWidth
,
ptr
->
data
.
nHeight
,
ptr
->
data
.
bBitsPerPixel
);
if
(
(
ciconinfo
->
data
.
ptHotSpot
.
x
==
ICON_HOTSPOT
)
&&
if
(
(
ptr
->
data
.
ptHotSpot
.
x
==
ICON_HOTSPOT
)
&&
(
ciconinfo
->
data
.
ptHotSpot
.
y
==
ICON_HOTSPOT
)
)
(
ptr
->
data
.
ptHotSpot
.
y
==
ICON_HOTSPOT
)
)
{
{
iconinfo
->
fIcon
=
TRUE
;
iconinfo
->
fIcon
=
TRUE
;
iconinfo
->
xHotspot
=
ciconinfo
->
data
.
nWidth
/
2
;
iconinfo
->
xHotspot
=
ptr
->
data
.
nWidth
/
2
;
iconinfo
->
yHotspot
=
ciconinfo
->
data
.
nHeight
/
2
;
iconinfo
->
yHotspot
=
ptr
->
data
.
nHeight
/
2
;
}
}
else
else
{
{
iconinfo
->
fIcon
=
FALSE
;
iconinfo
->
fIcon
=
FALSE
;
iconinfo
->
xHotspot
=
ciconinfo
->
data
.
ptHotSpot
.
x
;
iconinfo
->
xHotspot
=
ptr
->
data
.
ptHotSpot
.
x
;
iconinfo
->
yHotspot
=
ciconinfo
->
data
.
ptHotSpot
.
y
;
iconinfo
->
yHotspot
=
ptr
->
data
.
ptHotSpot
.
y
;
}
height
=
ciconinfo
->
data
.
nHeight
;
if
(
ciconinfo
->
data
.
bBitsPerPixel
>
1
)
{
iconinfo
->
hbmColor
=
CreateBitmap
(
ciconinfo
->
data
.
nWidth
,
ciconinfo
->
data
.
nHeight
,
ciconinfo
->
data
.
bPlanes
,
ciconinfo
->
data
.
bBitsPerPixel
,
(
char
*
)(
ciconinfo
+
1
)
+
ciconinfo
->
data
.
nHeight
*
get_bitmap_width_bytes
(
ciconinfo
->
data
.
nWidth
,
1
)
);
}
else
{
iconinfo
->
hbmColor
=
0
;
height
*=
2
;
}
}
iconinfo
->
hbm
Mask
=
CreateBitmap
(
ciconinfo
->
data
.
nWidth
,
height
,
iconinfo
->
hbm
Color
=
copy_bitmap
(
ptr
->
color
);
1
,
1
,
ciconinfo
+
1
);
iconinfo
->
hbmMask
=
copy_bitmap
(
ptr
->
mask
);
release_icon_ptr
(
hIcon
,
ciconinfo
);
release_icon_ptr
(
hIcon
,
ptr
);
return
TRUE
;
return
TRUE
;
}
}
...
...
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