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
506f77b8
Commit
506f77b8
authored
Nov 25, 2008
by
Andrew Riedi
Committed by
Alexandre Julliard
Dec 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Cursors can have more than one color.
parent
de94cfd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
cursoricon.c
dlls/user32/cursoricon.c
+10
-11
No files found.
dlls/user32/cursoricon.c
View file @
506f77b8
...
...
@@ -544,8 +544,8 @@ static BOOL CURSORICON_GetResIconEntry( LPVOID dir, int n,
* CURSORICON_FindBestCursor
*
* Find the cursor closest to the requested size.
*
FIXME: parameter 'color' ignored and entries with more than 1 bpp
*
ignored too
*
*
FIXME: parameter 'color' ignored.
*/
static
int
CURSORICON_FindBestCursor
(
LPVOID
dir
,
fnGetCIEntry
get_entry
,
int
width
,
int
height
,
int
color
)
...
...
@@ -562,8 +562,7 @@ static int CURSORICON_FindBestCursor( LPVOID dir, fnGetCIEntry get_entry,
for
(
i
=
0
;
get_entry
(
dir
,
i
,
&
cx
,
&
cy
,
&
bits
);
i
++
)
{
if
((
cx
<=
width
)
&&
(
cy
<=
height
)
&&
(
cx
>
maxwidth
)
&&
(
cy
>
maxheight
)
&&
(
bits
==
1
))
(
cx
>
maxwidth
)
&&
(
cy
>
maxheight
))
{
bestEntry
=
i
;
maxwidth
=
cx
;
...
...
@@ -577,8 +576,7 @@ static int CURSORICON_FindBestCursor( LPVOID dir, fnGetCIEntry get_entry,
maxwidth
=
maxheight
=
255
;
for
(
i
=
0
;
get_entry
(
dir
,
i
,
&
cx
,
&
cy
,
&
bits
);
i
++
)
{
if
(((
cx
<
maxwidth
)
&&
(
cy
<
maxheight
)
&&
(
bits
==
1
))
||
(
bestEntry
==-
1
))
if
(((
cx
<
maxwidth
)
&&
(
cy
<
maxheight
))
||
(
bestEntry
==
-
1
))
{
bestEntry
=
i
;
maxwidth
=
cx
;
...
...
@@ -958,7 +956,7 @@ static void riff_find_chunk( DWORD chunk_id, DWORD chunk_type, const riff_chunk_
* \- CHUNK:icon
*/
static
HCURSOR
CURSORICON_CreateIconFromANI
(
const
LPBYTE
bits
,
DWORD
bits_size
,
INT
width
,
INT
height
)
INT
width
,
INT
height
,
INT
colors
)
{
HCURSOR
cursor
;
ani_header
header
=
{
0
};
...
...
@@ -1011,7 +1009,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size,
icon_data
=
fram_chunk
.
data
+
(
2
*
sizeof
(
DWORD
));
entry
=
CURSORICON_FindBestCursorFile
(
(
CURSORICONFILEDIR
*
)
icon_data
,
width
,
height
,
1
);
width
,
height
,
colors
);
frame_bits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
entry
->
dwDIBSize
);
memcpy
(
frame_bits
,
icon_data
+
entry
->
dwDIBOffset
,
entry
->
dwDIBSize
);
...
...
@@ -1099,7 +1097,8 @@ static HICON CURSORICON_LoadFromFile( LPCWSTR filename,
/* Check for .ani. */
if
(
memcmp
(
bits
,
"RIFF"
,
4
)
==
0
)
{
hIcon
=
CURSORICON_CreateIconFromANI
(
bits
,
filesize
,
width
,
height
);
hIcon
=
CURSORICON_CreateIconFromANI
(
bits
,
filesize
,
width
,
height
,
colors
);
goto
end
;
}
...
...
@@ -1187,7 +1186,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
if
(
!
(
handle
=
LoadResource
(
hInstance
,
hRsrc
)))
return
0
;
if
(
!
(
dir
=
LockResource
(
handle
)))
return
0
;
if
(
fCursor
)
dirEntry
=
CURSORICON_FindBestCursorRes
(
dir
,
width
,
height
,
1
);
dirEntry
=
CURSORICON_FindBestCursorRes
(
dir
,
width
,
height
,
colors
);
else
dirEntry
=
CURSORICON_FindBestIconRes
(
dir
,
width
,
height
,
colors
);
if
(
!
dirEntry
)
return
0
;
...
...
@@ -1799,7 +1798,7 @@ INT WINAPI LookupIconIdFromDirectoryEx( LPBYTE xdir, BOOL bIcon,
if
(
bIcon
)
entry
=
CURSORICON_FindBestIconRes
(
dir
,
width
,
height
,
colors
);
else
entry
=
CURSORICON_FindBestCursorRes
(
dir
,
width
,
height
,
1
);
entry
=
CURSORICON_FindBestCursorRes
(
dir
,
width
,
height
,
colors
);
if
(
entry
)
retVal
=
entry
->
wResId
;
}
...
...
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