Commit 732e0e90 authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: Merge GAMMARAMP types into one type in WINED3D namespace.

parent 5f2987ae
......@@ -308,6 +308,7 @@ static void WINAPI IDirect3DDevice8Impl_SetGammaRamp(LPDIRECT3DDEVICE8 iface, DW
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_GetGammaRamp(LPDIRECT3DDEVICE8 iface, D3
IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
TRACE("(%p) Relay\n", This);
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
return IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, 0, (WINED3DGAMMARAMP *) pRamp);
}
......
......@@ -228,7 +228,8 @@ static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UI
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_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UI
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
TRACE("(%p) Relay\n", This);
/* Note: D3DGAMMARAMP is compatible with WINED3DGAMMARAMP */
return IWineD3DDevice_GetGammaRamp(This->WineD3DDevice, iSwapChain, (WINED3DGAMMARAMP *) pRamp);
}
......
......@@ -145,7 +145,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp(IDirectDrawGammaControl *iface,
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(IDirectDrawGammaControl *iface,
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,
......
......@@ -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
*/
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment