headers: Updarte dxva2api.idl to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
diff --git a/mingw-w64-headers/include/dxva2api.h b/mingw-w64-headers/include/dxva2api.h
index 015bc3e..d938bed 100644
--- a/mingw-w64-headers/include/dxva2api.h
+++ b/mingw-w64-headers/include/dxva2api.h
@@ -1557,25 +1557,24 @@
#endif
static inline DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha(void) {
DXVA2_Fixed32 f32;
- *(LONG *)&f32 = 0 + (1 << 16);
+ f32.ll = 0 + (1 << 16);
return f32;
}
static inline DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha(void) {
- DXVA2_Fixed32 f32 = {{{ 0 }}};
+ DXVA2_Fixed32 f32;
+ f32.ll = 0;
return f32;
}
static inline float DXVA2FixedToFloat(DXVA2_Fixed32 f32) {
- struct { USHORT Fraction; SHORT Value; } *_f32 = (void *)&f32;
- return (float)_f32->Value + (float)_f32->Fraction / (1 << 16);
+ return (float)f32.Value + (float)f32.Fraction / (1 << 16);
}
static inline DXVA2_Fixed32 DXVA2FloatToFixed(float f) {
DXVA2_Fixed32 f32;
- struct { USHORT Fraction; SHORT Value; } *_f32 = (void *)&f32;
- _f32->Value = ((ULONG) (f * (1 << 16))) >> 16;
- _f32->Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;
+ f32.Value = ((ULONG) (f * (1 << 16))) >> 16;
+ f32.Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;
return f32;
}
/* Begin additional prototypes for all interfaces */
diff --git a/mingw-w64-headers/include/dxva2api.idl b/mingw-w64-headers/include/dxva2api.idl
index 99c9351..63de780 100644
--- a/mingw-w64-headers/include/dxva2api.idl
+++ b/mingw-w64-headers/include/dxva2api.idl
@@ -805,24 +805,23 @@
cpp_quote("static inline DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha(void) {")
cpp_quote(" DXVA2_Fixed32 f32;")
-cpp_quote(" *(LONG *)&f32 = 0 + (1 << 16);")
+cpp_quote(" f32.ll = 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 = {{{ 0 }}};")
+cpp_quote(" DXVA2_Fixed32 f32;")
+cpp_quote(" f32.ll = 0;")
cpp_quote(" return f32;")
cpp_quote("}")
cpp_quote("")
cpp_quote("static inline float DXVA2FixedToFloat(DXVA2_Fixed32 f32) {")
-cpp_quote(" struct { USHORT Fraction; SHORT Value; } *_f32 = (void *)&f32;")
-cpp_quote(" return (float)_f32->Value + (float)_f32->Fraction / (1 << 16);")
+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(" 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(" f32.Value = ((ULONG) (f * (1 << 16))) >> 16;")
+cpp_quote(" f32.Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;")
cpp_quote(" return f32;")
cpp_quote("}")