include/dxva2api.idl: Fix build error when compiled as C++ Signed-off-by: Liu Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/include/dxva2api.idl b/mingw-w64-headers/include/dxva2api.idl index 04e620b..fc77f5c 100644 --- a/mingw-w64-headers/include/dxva2api.idl +++ b/mingw-w64-headers/include/dxva2api.idl
@@ -815,13 +815,15 @@ 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(" typedef struct { USHORT Fraction; SHORT Value; } fields;") +cpp_quote(" fields *_f32 = (fields *)(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(" struct { USHORT Fraction; SHORT Value; } *_f32 = (void *)&f32;") +cpp_quote(" typedef struct { USHORT Fraction; SHORT Value; } fields;") +cpp_quote(" fields *_f32 = (fields *)(void *)&f32;") cpp_quote(" _f32->Value = ((ULONG) (f * (1 << 16))) >> 16;") cpp_quote(" _f32->Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;") cpp_quote(" return f32;")