Module: wine Branch: master Commit: 732e0e908b299306889cc45df9245acdd6a159b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=732e0e908b299306889cc45df9...
Author: Ivan Gyurdiev ivg231@gmail.com Date: Tue Oct 10 21:58:01 2006 -0400
wined3d: Merge GAMMARAMP types into one type in WINED3D namespace.
---
dlls/d3d8/device.c | 2 ++ dlls/d3d9/device.c | 4 +++- dlls/ddraw/gamma.c | 5 +++-- include/wine/wined3d_interface.h | 19 ------------------- include/wine/wined3d_types.h | 6 ++++++ 5 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 92e32b3..a2312e6 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -308,6 +308,7 @@ static void WINAPI IDirect3DDevice8Impl_ IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; TRACE("(%p) Relay\n", This);
+ /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ return IWineD3DDevice_SetGammaRamp(This->WineD3DDevice, 0, Flags, (WINED3DGAMMARAMP *) pRamp); }
@@ -315,6 +316,7 @@ static void WINAPI IDirect3DDevice8Impl_ IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; TRACE("(%p) Relay\n", This);
+ /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ return IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, 0, (WINED3DGAMMARAMP *) pRamp); }
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2e6c3c3..7bec1e9 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -228,7 +228,8 @@ static void WINAPI IDirect3DDevice9Impl_
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; TRACE("(%p) Relay\n", This); - + + /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ return IWineD3DDevice_SetGammaRamp(This->WineD3DDevice, iSwapChain, Flags, (WINED3DGAMMARAMP *) pRamp); }
@@ -236,6 +237,7 @@ static void WINAPI IDirect3DDevice9Impl_ IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; TRACE("(%p) Relay\n", This);
+ /* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */ return IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, iSwapChain, (WINED3DGAMMARAMP *) pRamp); }
diff --git a/dlls/ddraw/gamma.c b/dlls/ddraw/gamma.c index 735c329..b885b81 100644 --- a/dlls/ddraw/gamma.c +++ b/dlls/ddraw/gamma.c @@ -145,7 +145,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp
if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { - /* This returns a void */ + /* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */ IWineD3DDevice_GetGammaRamp(This->ddraw->wineD3DDevice, 0 /* Swapchain */, (WINED3DGAMMARAMP *) GammaRamp); @@ -189,7 +189,8 @@ IDirectDrawGammaControlImpl_SetGammaRamp
if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { - /* This returns a void */ + + /* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */ IWineD3DDevice_SetGammaRamp(This->ddraw->wineD3DDevice, 0 /* Swapchain */, Flags, diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 4c3c9a8..79dfe2d 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -184,25 +184,6 @@ DEFINE_GUID(IID_IWineD3DStateBlock, DEFINE_GUID(IID_IWineD3DQuery, 0x905ddbac, 0x6f30, 0x11d9, 0xc6, 0x87, 0x0, 0x4, 0x61, 0x42, 0xc1, 0x4f);
- -/* The following have differing names, but actually are the same layout. */ -/* Also, D3DCAPS8 is a subset of D3DCAPS9 so can be typecase as long as - none of the 9 fields are accessed when the device is d3d8 */ -/* TODO: remove the d3d8/d3d9 dependencies by making a all inclusive WINED3D version */ -#if defined( __WINE_D3D9_H ) - /* Identical: */ -# define WINED3DGAMMARAMP D3DGAMMARAMP - -#elif defined( __WINE_D3D8_H ) - /* Identical: */ -# define WINED3DGAMMARAMP D3DGAMMARAMP - -#else /* defined (__WINE_D3D_H ) */ - /* Identical: */ -# define WINED3DGAMMARAMP DDGAMMARAMP - -#endif - /***************************************************************************** * Callback functions required for predefining surfaces / stencils */ diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 9bc2698..76bd905 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -85,6 +85,12 @@ typedef struct _WINED3DVIEWPORT { float MaxZ; } WINED3DVIEWPORT;
+typedef struct _WINED3DGAMMARAMP { + WORD red [256]; + WORD green[256]; + WORD blue [256]; +} WINED3DGAMMARAMP; + #define WINED3D_VSHADER_MAX_CONSTANTS 96 #define WINED3D_PSHADER_MAX_CONSTANTS 32