diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index ffd78b9f34e..a9fccac85b3 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -272,7 +272,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, D3 IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; if (Level < This->baseTexture.levels) { - hr = IWineD3DSurface_UnlockRect((IWineD3DSurface *) This->surfaces[FaceType][Level]); + hr = IWineD3DSurface_UnlockRect(This->surfaces[FaceType][Level]); } if (D3D_OK == hr) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 90c6878987e..d9bb39c2900 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5148,7 +5148,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface,DWORD if(RenderTargetIndex > 0) FIXME("(%p) : RenderTargetIndex %ld >0 not currently supported\n", This, RenderTargetIndex); - *ppRenderTarget = (IWineD3DSurface *)This->renderTarget; + *ppRenderTarget = This->renderTarget; TRACE("(%p) : RenderTarget %ld Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget); /* Note inc ref on returned surface */ if(*ppRenderTarget != NULL) @@ -5158,7 +5158,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface,DWORD HRESULT WINAPI IWineD3DDeviceImpl_GetDepthStencilSurface(IWineD3DDevice* iface, IWineD3DSurface **ppZStencilSurface) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - *ppZStencilSurface = (IWineD3DSurface *)This->depthStencilBuffer; + *ppZStencilSurface = This->depthStencilBuffer; TRACE("(%p) : zStencilSurface returning %p\n", This, *ppZStencilSurface); if(*ppZStencilSurface != NULL) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d242119c682..79358cc0e70 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -995,7 +995,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { ++gen; if ((gen % 10) == 0) { snprintf(buffer, sizeof(buffer), "/tmp/surface%p_type%u_level%u_%u.ppm", This, This->glDescription.target, This->glDescription.level, gen); - IWineD3DSurfaceImpl_SaveSnapshot((IWineD3DSurface *) This, buffer); + IWineD3DSurfaceImpl_SaveSnapshot(iface, buffer); } /* * debugging crash code diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 7a526bbef92..42d2a99c2d3 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -226,7 +226,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC checkGLcall("glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);"); /* If this swapchain is currently the active context then make this swapchain active */ - if(IWineD3DSurface_GetContainer((IWineD3DSurface *)This->wineD3DDevice->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmp) == D3D_OK){ + if(IWineD3DSurface_GetContainer(This->wineD3DDevice->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmp) == D3D_OK){ if(tmp != (IUnknown *)This){ glXMakeCurrent(This->display, currentDrawable, currentContext); checkGLcall("glXMakeCurrent"); @@ -346,7 +346,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UIN IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; - *ppBackBuffer = (IWineD3DSurface *) This->backBuffer; + *ppBackBuffer = This->backBuffer; TRACE("(%p) : BackBuf %d Type %d returning %p\n", This, iBackBuffer, Type, *ppBackBuffer); if (iBackBuffer > This->presentParms.BackBufferCount - 1) { diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index b14064c5238..8acd0838c41 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -208,7 +208,7 @@ HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, UINT Lev if (Level < This->baseTexture.levels) { TRACE("(%p) Level (%d)\n", This, Level); - return IWineD3DSurface_GetDesc((IWineD3DSurface *) This->surfaces[Level], pDesc); + return IWineD3DSurface_GetDesc(This->surfaces[Level], pDesc); } FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); return D3DERR_INVALIDCALL; @@ -237,7 +237,7 @@ HRESULT WINAPI IWineD3DTextureImpl_LockRect(IWineD3DTexture *iface, UINT Level, HRESULT hr = D3DERR_INVALIDCALL; if (Level < This->baseTexture.levels) { - hr = IWineD3DSurface_LockRect((IWineD3DSurface *) This->surfaces[Level], pLockedRect, pRect, Flags); + hr = IWineD3DSurface_LockRect(This->surfaces[Level], pLockedRect, pRect, Flags); } if (D3D_OK == hr) { TRACE("(%p) Level (%d) success\n", This, Level); @@ -267,7 +267,7 @@ HRESULT WINAPI IWineD3DTextureImpl_AddDirtyRect(IWineD3DTexture *iface, CONST RE IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; This->baseTexture.dirty = TRUE; TRACE("(%p) : dirtyfication of surface Level (0)\n", This); - return IWineD3DSurface_AddDirtyRect((IWineD3DSurface *)This->surfaces[0], pDirtyRect); + return IWineD3DSurface_AddDirtyRect(This->surfaces[0], pDirtyRect); } const IWineD3DTextureVtbl IWineD3DTexture_Vtbl = diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 2204c889f1a..0e8d9cd5afb 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -60,7 +60,7 @@ ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *iface) { for (i = 0; i < This->baseTexture.levels; i++) { if (This->volumes[i] != NULL) { TRACE("(%p) : Releasing volume %p\n", This, This->volumes[i]); - IWineD3DVolume_Release((IWineD3DSurface *) This->volumes[i]); + IWineD3DVolume_Release(This->volumes[i]); } } IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface);