*Copyright 2002-2003 Jason Edmeades
*Copyright 2002-2003 Raphael Junqueira
*Copyright 2005 Oliver Stieber
- *Copyright 2007-2008 Stefan Dösinger for CodeWeavers
+ *Copyright 2007-2008 Stefan Dösinger for CodeWeavers
*
*This library is free software; you can redistribute it and/or
*modify it under the terms of the GNU Lesser General Public
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL(fps);
-static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroyRenderback) {
+static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface)
+{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
WINED3DDISPLAYMODE mode;
/* release the ref to the front and back buffer parents */
if(This->frontBuffer) {
IWineD3DSurface_SetContainer(This->frontBuffer, 0);
- if(D3DCB_DestroyRenderback(This->frontBuffer) > 0) {
- FIXME("(%p) Something's still holding the front buffer\n",This);
+ if (IWineD3DSurface_Release(This->frontBuffer) > 0)
+ {
+ WARN("(%p) Something's still holding the front buffer\n",This);
}
}
if(This->backBuffer) {
- int i;
+ UINT i;
for(i = 0; i < This->presentParms.BackBufferCount; i++) {
IWineD3DSurface_SetContainer(This->backBuffer[i], 0);
- if(D3DCB_DestroyRenderback(This->backBuffer[i]) > 0) {
- FIXME("(%p) Something's still holding the back buffer\n",This);
+ if (IWineD3DSurface_Release(This->backBuffer[i]) > 0)
+ {
+ WARN("(%p) Something's still holding the back buffer\n",This);
}
}
HeapFree(GetProcessHeap(), 0, This->backBuffer);
* this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution
* before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params
*/
- if(This->presentParms.Windowed == FALSE) {
+ if(This->presentParms.Windowed == FALSE && This->presentParms.AutoRestoreDisplayMode) {
mode.Width = This->orig_width;
mode.Height = This->orig_height;
mode.RefreshRate = 0;
mode.Format = This->orig_fmt;
- IWineD3DDevice_SetDisplayMode((IWineD3DDevice *) This->wineD3DDevice, 0, &mode);
+ IWineD3DDevice_SetDisplayMode((IWineD3DDevice *)This->device, 0, &mode);
}
+ HeapFree(GetProcessHeap(), 0, This->context);
HeapFree(GetProcessHeap(), 0, This);
}
* rc: Rectangle to copy
*
*****************************************************************************/
-void x11_copy_to_screen(IWineD3DSwapChainImpl *This, LPRECT rc) {
+void x11_copy_to_screen(IWineD3DSwapChainImpl *This, const RECT *rc)
+{
IWineD3DSurfaceImpl *front = (IWineD3DSurfaceImpl *) This->frontBuffer;
if(front->resource.usage & WINED3DUSAGE_RENDERTARGET) {
return WINED3D_OK;
}
-/* FIXME: This should not be needed, the base version is OK */
-HRESULT WINAPI IWineGDIBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WINED3DDISPLAYMODE*pMode) {
- IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
- IWineD3DDeviceImpl *device = This->wineD3DDevice;
-
- pMode->Width = device->ddraw_width;
- pMode->Height = device->ddraw_height;
- pMode->Format = device->ddraw_format;
- pMode->RefreshRate = 0;
- return WINED3D_OK;
-}
-
const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl =
{
/* IUnknown */