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
6aeb891d
Commit
6aeb891d
authored
Jun 24, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Make inline helpers compatible with NONAMELESSUNION.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6ea77ccf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
dxva2api.idl
include/dxva2api.idl
+7
-6
No files found.
include/dxva2api.idl
View file @
6aeb891d
...
...
@@ -805,23 +805,24 @@ cpp_quote("#endif")
cpp_quote
(
"static inline DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha(void) {"
)
cpp_quote
(
" DXVA2_Fixed32 f32;"
)
cpp_quote
(
"
f32.ll
= 0 + (1 << 16);"
)
cpp_quote
(
"
*(LONG *)&f32
= 0 + (1 << 16);"
)
cpp_quote
(
" return f32;"
)
cpp_quote
(
"}"
)
cpp_quote
(
""
)
cpp_quote
(
"static inline DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha(void) {"
)
cpp_quote
(
" DXVA2_Fixed32 f32;"
)
cpp_quote
(
" f32.ll = 0;"
)
cpp_quote
(
" DXVA2_Fixed32 f32 = {{{ 0 }}};"
)
cpp_quote
(
" return f32;"
)
cpp_quote
(
"}"
)
cpp_quote
(
""
)
cpp_quote
(
"static inline float DXVA2FixedToFloat(DXVA2_Fixed32 f32) {"
)
cpp_quote
(
" return (float)f32.Value + (float)f32.Fraction / (1 << 16);"
)
cpp_quote
(
" struct { USHORT Fraction; SHORT Value; } *_f32 = (void *)&f32;"
)
cpp_quote
(
" return (float)_f32->Value + (float)_f32->Fraction / (1 << 16);"
)
cpp_quote
(
"}"
)
cpp_quote
(
""
)
cpp_quote
(
"static inline DXVA2_Fixed32 DXVA2FloatToFixed(float f) {"
)
cpp_quote
(
" DXVA2_Fixed32 f32;"
)
cpp_quote
(
" f32.Value = ((ULONG) (f * (1 << 16))) >> 16;"
)
cpp_quote
(
" f32.Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;"
)
cpp_quote
(
" struct { USHORT Fraction; SHORT Value; } *_f32 = (void *)&f32;"
)
cpp_quote
(
" _f32->Value = ((ULONG) (f * (1 << 16))) >> 16;"
)
cpp_quote
(
" _f32->Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;"
)
cpp_quote
(
" return f32;"
)
cpp_quote
(
"}"
)
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