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
b9b159e5
Commit
b9b159e5
authored
Apr 21, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix EMR_CREATEPALETTE recording.
parent
c752e845
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
emfdc.c
dlls/gdi32/emfdc.c
+14
-14
No files found.
dlls/gdi32/emfdc.c
View file @
b9b159e5
...
@@ -651,27 +651,27 @@ static BOOL emfdc_select_pen( DC_ATTR *dc_attr, HPEN pen )
...
@@ -651,27 +651,27 @@ static BOOL emfdc_select_pen( DC_ATTR *dc_attr, HPEN pen )
static
DWORD
emfdc_create_palette
(
struct
emf
*
emf
,
HPALETTE
hPal
)
static
DWORD
emfdc_create_palette
(
struct
emf
*
emf
,
HPALETTE
hPal
)
{
{
BYTE
data
[
offsetof
(
EMRCREATEPALETTE
,
lgpl
.
palPalEntry
[
256
]
)];
EMRCREATEPALETTE
*
hdr
=
(
EMRCREATEPALETTE
*
)
data
;
WORD
i
;
WORD
i
;
struct
{
EMRCREATEPALETTE
hdr
;
PALETTEENTRY
entry
[
255
];
}
pal
;
memset
(
&
pal
,
0
,
sizeof
(
pal
)
);
memset
(
data
,
0
,
sizeof
(
data
)
);
if
(
!
GetObjectW
(
hPal
,
sizeof
(
pal
.
hdr
.
lgpl
)
+
sizeof
(
pal
.
entry
),
&
pal
.
hdr
.
lgpl
))
hdr
->
lgpl
.
palVersion
=
0x300
;
hdr
->
lgpl
.
palNumEntries
=
GetPaletteEntries
(
hPal
,
0
,
256
,
hdr
->
lgpl
.
palPalEntry
);
if
(
!
hdr
->
lgpl
.
palNumEntries
)
return
0
;
return
0
;
for
(
i
=
0
;
i
<
pal
.
hdr
.
lgpl
.
palNumEntries
;
i
++
)
for
(
i
=
0
;
i
<
hdr
->
lgpl
.
palNumEntries
;
i
++
)
pal
.
hdr
.
lgpl
.
palPalEntry
[
i
].
peFlags
=
0
;
hdr
->
lgpl
.
palPalEntry
[
i
].
peFlags
=
0
;
pal
.
hdr
.
emr
.
iType
=
EMR_CREATEPALETTE
;
hdr
->
emr
.
iType
=
EMR_CREATEPALETTE
;
pal
.
hdr
.
emr
.
nSize
=
sizeof
(
pal
.
hdr
)
+
pal
.
hdr
.
lgpl
.
palNumEntries
*
sizeof
(
PALETTEENTRY
);
hdr
->
emr
.
nSize
=
offsetof
(
EMRCREATEPALETTE
,
lgpl
.
palPalEntry
[
hdr
->
lgpl
.
palNumEntries
]
);
pal
.
hdr
.
ihPal
=
emfdc_add_handle
(
emf
,
hPal
);
hdr
->
ihPal
=
emfdc_add_handle
(
emf
,
hPal
);
if
(
!
emfdc_record
(
emf
,
&
pal
.
hdr
.
emr
))
if
(
!
emfdc_record
(
emf
,
&
hdr
->
emr
))
pal
.
hdr
.
ihPal
=
0
;
hdr
->
ihPal
=
0
;
return
pal
.
hdr
.
ihPal
;
return
hdr
->
ihPal
;
}
}
BOOL
EMFDC_SelectPalette
(
DC_ATTR
*
dc_attr
,
HPALETTE
palette
)
BOOL
EMFDC_SelectPalette
(
DC_ATTR
*
dc_attr
,
HPALETTE
palette
)
...
...
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