Henri Verbeet : wined3d: Use proper enum elements for FOURCC formats.
Alexandre Julliard
julliard at winehq.org
Wed Dec 23 10:04:11 CST 2009
Module: wine
Branch: master
Commit: 3288911ae3e3cbd7124ed60d805ff3310f6a21c9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3288911ae3e3cbd7124ed60d805ff3310f6a21c9
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Dec 22 18:32:17 2009 +0100
wined3d: Use proper enum elements for FOURCC formats.
---
dlls/wined3d/wined3d_private.h | 4 ++++
include/wine/wined3d.idl | 33 +++++++++++++++------------------
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7f1fc13..489137c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2894,4 +2894,8 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface,
/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
#define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"
+#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \
+ ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
+ ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
+
#endif
diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl
index 27267c2..7196a98 100644
--- a/include/wine/wined3d.idl
+++ b/include/wine/wined3d.idl
@@ -253,27 +253,24 @@ typedef enum _WINED3DFORMAT
WINED3DFMT_B5G5R5A1_UNORM,
WINED3DFMT_B8G8R8A8_UNORM,
WINED3DFMT_B8G8R8X8_UNORM,
+ /* FOURCC formats. */
+ WINED3DFMT_UYVY = 0x59565955, /* UYVY */
+ WINED3DFMT_YUY2 = 0x32595559, /* YUY2 */
+ WINED3DFMT_YV12 = 0x32315659, /* YV12 */
+ WINED3DFMT_DXT1 = 0x31545844, /* DXT1 */
+ WINED3DFMT_DXT2 = 0x32545844, /* DXT2 */
+ WINED3DFMT_DXT3 = 0x33545844, /* DXT3 */
+ WINED3DFMT_DXT4 = 0x34545844, /* DXT4 */
+ WINED3DFMT_DXT5 = 0x35545844, /* DXT5 */
+ WINED3DFMT_MULTI2_ARGB8 = 0x3154454d, /* MET1 */
+ WINED3DFMT_G8R8_G8B8 = 0x42475247, /* GRGB */
+ WINED3DFMT_R8G8_B8G8 = 0x47424752, /* RGBG */
+ WINED3DFMT_ATI2N = 0x32495441, /* ATI2 */
+ WINED3DFMT_NVHU = 0x5548564e, /* NVHU */
+ WINED3DFMT_NVHS = 0x5348564e, /* NVHS */
WINED3DFMT_FORCE_DWORD = 0xffffffff
} WINED3DFORMAT;
-cpp_quote("#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \\")
-cpp_quote(" ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \\")
-cpp_quote(" ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))")
-cpp_quote("#define WINED3DFMT_UYVY WINEMAKEFOURCC('U', 'Y', 'V', 'Y')")
-cpp_quote("#define WINED3DFMT_YUY2 WINEMAKEFOURCC('Y', 'U', 'Y', '2')")
-cpp_quote("#define WINED3DFMT_YV12 WINEMAKEFOURCC('Y', 'V', '1', '2')")
-cpp_quote("#define WINED3DFMT_DXT1 WINEMAKEFOURCC('D', 'X', 'T', '1')")
-cpp_quote("#define WINED3DFMT_DXT2 WINEMAKEFOURCC('D', 'X', 'T', '2')")
-cpp_quote("#define WINED3DFMT_DXT3 WINEMAKEFOURCC('D', 'X', 'T', '3')")
-cpp_quote("#define WINED3DFMT_DXT4 WINEMAKEFOURCC('D', 'X', 'T', '4')")
-cpp_quote("#define WINED3DFMT_DXT5 WINEMAKEFOURCC('D', 'X', 'T', '5')")
-cpp_quote("#define WINED3DFMT_MULTI2_ARGB8 WINEMAKEFOURCC('M', 'E', 'T', '1')")
-cpp_quote("#define WINED3DFMT_G8R8_G8B8 WINEMAKEFOURCC('G', 'R', 'G', 'B')")
-cpp_quote("#define WINED3DFMT_R8G8_B8G8 WINEMAKEFOURCC('R', 'G', 'B', 'G')")
-/* Vendor specific formats */
-cpp_quote("#define WINED3DFMT_ATI2N WINEMAKEFOURCC('A', 'T', 'I', '2')")
-cpp_quote("#define WINED3DFMT_NVHU WINEMAKEFOURCC('N', 'V', 'H', 'U')")
-cpp_quote("#define WINED3DFMT_NVHS WINEMAKEFOURCC('N', 'V', 'H', 'S')")
typedef enum _WINED3DRENDERSTATETYPE
{
More information about the wine-cvs
mailing list