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
8970e29f
Commit
8970e29f
authored
Apr 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Support creating animated icons, not only cursors.
parent
99f6894c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
cursoricon.c
dlls/user32/cursoricon.c
+7
-6
No files found.
dlls/user32/cursoricon.c
View file @
8970e29f
...
...
@@ -1078,8 +1078,8 @@ 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
depth
,
UINT
loadflags
)
static
HCURSOR
CURSORICON_CreateIconFromANI
(
const
LPBYTE
bits
,
DWORD
bits_size
,
INT
width
,
INT
height
,
INT
depth
,
BOOL
is_icon
,
UINT
loadflags
)
{
struct
animated_cursoricon_object
*
ani_icon_data
;
struct
cursoricon_object
*
info
;
...
...
@@ -1161,7 +1161,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size,
info
=
get_icon_ptr
(
cursor
);
ani_icon_data
=
(
struct
animated_cursoricon_object
*
)
info
;
info
->
is_icon
=
FALSE
;
info
->
is_icon
=
is_icon
;
ani_icon_data
->
num_frames
=
header
.
num_frames
;
/* The .ANI stores the display rate in jiffies (1/60s) */
...
...
@@ -1195,7 +1195,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size,
/* Grab a frame from the animation */
frames
[
i
]
=
create_icon_from_bmi
(
(
BITMAPINFO
*
)
bmi
,
NULL
,
NULL
,
NULL
,
info
->
hotspot
,
FALSE
,
frameWidth
,
frameHeight
,
loadflags
);
is_icon
,
frameWidth
,
frameHeight
,
loadflags
);
if
(
!
frames
[
i
])
{
FIXME_
(
cursor
)(
"failed to convert animated cursor frame.
\n
"
);
...
...
@@ -1284,7 +1284,8 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
/* Check if the resource is an animated icon/cursor */
if
(
!
memcmp
(
bits
,
"RIFF"
,
4
))
return
CURSORICON_CreateIconFromANI
(
bits
,
cbSize
,
width
,
height
,
0
/* default depth */
,
cFlag
);
return
CURSORICON_CreateIconFromANI
(
bits
,
cbSize
,
width
,
height
,
0
/* default depth */
,
bIcon
,
cFlag
);
if
(
bIcon
)
{
...
...
@@ -1334,7 +1335,7 @@ static HICON CURSORICON_LoadFromFile( LPCWSTR filename,
/* Check for .ani. */
if
(
memcmp
(
bits
,
"RIFF"
,
4
)
==
0
)
{
hIcon
=
CURSORICON_CreateIconFromANI
(
bits
,
filesize
,
width
,
height
,
depth
,
loadflags
);
hIcon
=
CURSORICON_CreateIconFromANI
(
bits
,
filesize
,
width
,
height
,
depth
,
!
fCursor
,
loadflags
);
goto
end
;
}
...
...
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