wined3d: Restore the gamma when destroying the swapchain.
This commit is contained in:
parent
2d4d18b59d
commit
8d930f6009
|
@ -1599,6 +1599,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
|
||||||
object->wantsDepthStencilBuffer = FALSE;
|
object->wantsDepthStencilBuffer = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IWineD3DSwapChain_GetGammaRamp((IWineD3DSwapChain *) object, &object->orig_gamma);
|
||||||
|
|
||||||
TRACE("Created swapchain %p\n", object);
|
TRACE("Created swapchain %p\n", object);
|
||||||
TRACE("FrontBuf @ %p, BackBuf @ %p, DepthStencil %d\n",object->frontBuffer, object->backBuffer ? object->backBuffer[0] : NULL, object->wantsDepthStencilBuffer);
|
TRACE("FrontBuf @ %p, BackBuf @ %p, DepthStencil %d\n",object->frontBuffer, object->backBuffer ? object->backBuffer[0] : NULL, object->wantsDepthStencilBuffer);
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
|
|
|
@ -88,6 +88,10 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
|
||||||
WINED3DDISPLAYMODE mode;
|
WINED3DDISPLAYMODE mode;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
TRACE("Destroying swapchain %p\n", iface);
|
||||||
|
|
||||||
|
IWineD3DSwapChain_SetGammaRamp(iface, 0, &This->orig_gamma);
|
||||||
|
|
||||||
/* release the ref to the front and back buffer parents */
|
/* release the ref to the front and back buffer parents */
|
||||||
if(This->frontBuffer) {
|
if(This->frontBuffer) {
|
||||||
IWineD3DSurface_SetContainer(This->frontBuffer, 0);
|
IWineD3DSurface_SetContainer(This->frontBuffer, 0);
|
||||||
|
|
|
@ -1698,6 +1698,7 @@ typedef struct IWineD3DSwapChainImpl
|
||||||
WINED3DPRESENT_PARAMETERS presentParms;
|
WINED3DPRESENT_PARAMETERS presentParms;
|
||||||
DWORD orig_width, orig_height;
|
DWORD orig_width, orig_height;
|
||||||
WINED3DFORMAT orig_fmt;
|
WINED3DFORMAT orig_fmt;
|
||||||
|
WINED3DGAMMARAMP orig_gamma;
|
||||||
|
|
||||||
long prev_time, frames; /* Performance tracking */
|
long prev_time, frames; /* Performance tracking */
|
||||||
unsigned int vSyncCounter;
|
unsigned int vSyncCounter;
|
||||||
|
|
Loading…
Reference in New Issue