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
183394cd
Commit
183394cd
authored
Mar 23, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Use D3DCOLORVALUE equivalent to avoid nameless unions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
016fe6af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
Makefile.in
dlls/dwrite/Makefile.in
+0
-1
opentype.c
dlls/dwrite/opentype.c
+13
-5
No files found.
dlls/dwrite/Makefile.in
View file @
183394cd
...
...
@@ -2,7 +2,6 @@ MODULE = dwrite.dll
IMPORTLIB
=
dwrite
IMPORTS
=
user32 gdi32 advapi32
EXTRAINCL
=
$(FREETYPE_CFLAGS)
EXTRADEFS
=
-DWINE_NO_NAMELESS_EXTENSION
C_SRCS
=
\
analyzer.c
\
...
...
dlls/dwrite/opentype.c
View file @
183394cd
...
...
@@ -2858,6 +2858,13 @@ HRESULT opentype_get_cpal_entries(const struct dwrite_fonttable *cpal, unsigned
unsigned
int
num_palettes
,
num_palette_entries
,
i
;
const
struct
cpal_color_record
*
records
;
const
struct
cpal_header_0
*
header
;
struct
d3d_color
{
float
r
;
float
g
;
float
b
;
float
a
;
}
*
colors
=
(
void
*
)
entries
;
header
=
table_read_ensure
(
cpal
,
0
,
sizeof
(
*
header
));
...
...
@@ -2883,11 +2890,12 @@ HRESULT opentype_get_cpal_entries(const struct dwrite_fonttable *cpal, unsigned
first_entry_index
+=
GET_BE_WORD
(
header
->
color_record_indices
[
palette
]);
for
(
i
=
0
;
i
<
entry_count
;
i
++
)
{
entries
[
i
].
u1
.
r
=
records
[
first_entry_index
+
i
].
red
/
255
.
0
f
;
entries
[
i
].
u2
.
g
=
records
[
first_entry_index
+
i
].
green
/
255
.
0
f
;
entries
[
i
].
u3
.
b
=
records
[
first_entry_index
+
i
].
blue
/
255
.
0
f
;
entries
[
i
].
u4
.
a
=
records
[
first_entry_index
+
i
].
alpha
/
255
.
0
f
;
for
(
i
=
0
;
i
<
entry_count
;
++
i
)
{
colors
[
i
].
r
=
records
[
first_entry_index
+
i
].
red
/
255
.
0
f
;
colors
[
i
].
g
=
records
[
first_entry_index
+
i
].
green
/
255
.
0
f
;
colors
[
i
].
b
=
records
[
first_entry_index
+
i
].
blue
/
255
.
0
f
;
colors
[
i
].
a
=
records
[
first_entry_index
+
i
].
alpha
/
255
.
0
f
;
}
return
S_OK
;
...
...
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