From d6d345fa8aee8f394e20ea2f9bbcd3645b999992 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 28 Sep 2010 12:00:21 +0200 Subject: [PATCH] wined3d: Remove IWineD3DStateBlock::InitStartupStateBlock() from the public wined3d interface. --- dlls/wined3d/device.c | 7 ++----- dlls/wined3d/stateblock.c | 8 ++------ dlls/wined3d/wined3d_private.h | 1 + include/wine/wined3d.idl | 2 -- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 89ddb856c10..0967bd83cdb 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1888,7 +1888,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, /* Set up some starting GL setup */ /* Setup all the devices defaults */ - IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *)This->stateBlock); + stateblock_init_default_state(This->stateBlock); context = context_acquire(This, swapchain->front_buffer); @@ -6469,10 +6469,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface, This->updateStateBlock = This->stateBlock; IWineD3DStateBlock_AddRef((IWineD3DStateBlock *)This->updateStateBlock); - hr = IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *) This->stateBlock); - if(FAILED(hr)) { - ERR("Resetting the stateblock failed with error 0x%08x\n", hr); - } + stateblock_init_default_state(This->stateBlock); if(wined3d_settings.offscreen_rendering_mode == ORM_FBO) { diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index f8eb9313798..5b58de92fca 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1078,9 +1078,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) return WINED3D_OK; } -static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock *iface) +void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) { - IWineD3DStateBlockImpl *stateblock = (IWineD3DStateBlockImpl *)iface; IWineD3DDeviceImpl *device = stateblock->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct wined3d_state *state = &stateblock->state; @@ -1097,7 +1096,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DState IWineD3DSurface *backbuffer; HRESULT hr; - TRACE("iface %p.\n", iface); + TRACE("stateblock %p.\n", stateblock); stateblock->blockType = WINED3DSBT_INIT; @@ -1328,8 +1327,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DState } TRACE("Done.\n"); - - return WINED3D_OK; } /********************************************************** @@ -1345,7 +1342,6 @@ static const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl = /* IWineD3DStateBlock */ IWineD3DStateBlockImpl_Capture, IWineD3DStateBlockImpl_Apply, - IWineD3DStateBlockImpl_InitStartupStateBlock }; HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 61cd60d1e3f..663a9d44c88 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2429,6 +2429,7 @@ struct IWineD3DStateBlockImpl HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) DECLSPEC_HIDDEN; void stateblock_init_contained_states(IWineD3DStateBlockImpl *object) DECLSPEC_HIDDEN; +void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) DECLSPEC_HIDDEN; static inline void stateblock_apply_state(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index fcc6a8965dc..548a08ab2cd 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -2647,8 +2647,6 @@ interface IWineD3DStateBlock : IUnknown ); HRESULT Apply( ); - HRESULT InitStartupStateBlock( - ); } [