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
c9d806a0
Commit
c9d806a0
authored
Mar 27, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Add support for PNG icons.
parent
a4cb7c46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
newstruc.c
tools/wrc/newstruc.c
+17
-14
No files found.
tools/wrc/newstruc.c
View file @
c9d806a0
...
...
@@ -34,6 +34,8 @@
#include "wingdi.h"
/* for BITMAPINFOHEADER */
#define ICO_PNG_MAGIC 0x474e5089
#include <pshpack2.h>
typedef
struct
{
...
...
@@ -397,27 +399,28 @@ static int convert_bitmap(char *data, int size)
}
bmsize
=
bih
->
bV5Size
;
if
(
bmsize
>>
16
)
/* assume swapped */
{
#ifndef WORDS_BIGENDIAN
type
|=
FL_SIZEBE
;
#endif
bmsize
=
BYTESWAP_DWORD
(
bmsize
);
}
else
{
#ifdef WORDS_BIGENDIAN
type
|=
FL_SIZEBE
;
#endif
}
switch
(
bmsize
)
{
case
sizeof
(
BITMAPOS2HEADER
):
case
sizeof
(
BITMAPINFOHEADER
):
case
sizeof
(
BITMAPV4HEADER
):
case
sizeof
(
BITMAPV5HEADER
):
#ifdef WORDS_BIGENDIAN
type
|=
FL_SIZEBE
;
#endif
break
;
case
BYTESWAP_DWORD
(
sizeof
(
BITMAPOS2HEADER
)
):
case
BYTESWAP_DWORD
(
sizeof
(
BITMAPINFOHEADER
)
):
case
BYTESWAP_DWORD
(
sizeof
(
BITMAPV4HEADER
)
):
case
BYTESWAP_DWORD
(
sizeof
(
BITMAPV5HEADER
)
):
#ifndef WORDS_BIGENDIAN
type
|=
FL_SIZEBE
;
#endif
bmsize
=
BYTESWAP_DWORD
(
bmsize
);
break
;
case
ICO_PNG_MAGIC
:
case
BYTESWAP_DWORD
(
ICO_PNG_MAGIC
):
return
0
;
/* nothing to convert */
default:
parser_error
(
"Invalid bitmap format, bih->biSize = %d"
,
bih
->
bV5Size
);
}
...
...
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