diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c8f6ea1db9a..51c2fa73879 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -425,8 +425,8 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) { if (This->hardwareCursor) DestroyCursor(This->hardwareCursor); This->haveHardwareCursor = FALSE; - IWineD3D_Release(This->wineD3D); - This->wineD3D = NULL; + IWineD3D_Release(This->wined3d); + This->wined3d = NULL; HeapFree(GetProcessHeap(), 0, This); TRACE("Freed device %p\n", This); This = NULL; @@ -1110,7 +1110,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface, } /* Get info on the current display setup */ - IWineD3D_GetAdapterDisplayMode(This->wineD3D, This->adapter->ordinal, &Mode); + IWineD3D_GetAdapterDisplayMode(This->wined3d, This->adapter->ordinal, &Mode); object->orig_width = Mode.Width; object->orig_height = Mode.Height; object->orig_fmt = Mode.Format; @@ -2251,8 +2251,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U static HRESULT WINAPI IWineD3DDeviceImpl_GetDirect3D(IWineD3DDevice *iface, IWineD3D **ppD3D) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - *ppD3D= This->wineD3D; - TRACE("(%p) : wineD3D returning %p\n", This, *ppD3D); + *ppD3D = This->wined3d; + TRACE("Returning %p.\n", *ppD3D); IWineD3D_AddRef(*ppD3D); return WINED3D_OK; } @@ -4419,7 +4419,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetBackBuffer(IWineD3DDevice *iface, UI static HRESULT WINAPI IWineD3DDeviceImpl_GetDeviceCaps(IWineD3DDevice *iface, WINED3DCAPS* pCaps) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; WARN("(%p) : stub, calling idirect3d for now\n", This); - return IWineD3D_GetDeviceCaps(This->wineD3D, This->adapter->ordinal, This->devType, pCaps); + return IWineD3D_GetDeviceCaps(This->wined3d, This->adapter->ordinal, This->devType, pCaps); } static HRESULT WINAPI IWineD3DDeviceImpl_GetDisplayMode(IWineD3DDevice *iface, UINT iSwapChain, WINED3DDISPLAYMODE* pMode) { @@ -6615,10 +6615,10 @@ static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, const WINED3DPRE if(!pp->BackBufferWidth) return TRUE; if(!pp->BackBufferHeight) return TRUE; - count = IWineD3D_GetAdapterModeCount(This->wineD3D, This->adapter->ordinal, WINED3DFMT_UNKNOWN); + count = IWineD3D_GetAdapterModeCount(This->wined3d, This->adapter->ordinal, WINED3DFMT_UNKNOWN); for(i = 0; i < count; i++) { memset(&m, 0, sizeof(m)); - hr = IWineD3D_EnumAdapterModes(This->wineD3D, This->adapter->ordinal, WINED3DFMT_UNKNOWN, i, &m); + hr = IWineD3D_EnumAdapterModes(This->wined3d, This->adapter->ordinal, WINED3DFMT_UNKNOWN, i, &m); if(FAILED(hr)) { ERR("EnumAdapterModes failed\n"); } @@ -7303,8 +7303,8 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, device->lpVtbl = &IWineD3DDevice_Vtbl; device->ref = 1; - device->wineD3D = (IWineD3D *)wined3d; - IWineD3D_AddRef(device->wineD3D); + device->wined3d = (IWineD3D *)wined3d; + IWineD3D_AddRef(device->wined3d); device->adapter = wined3d->adapter_count ? adapter : NULL; device->parent = parent; device->device_parent = device_parent; @@ -7319,7 +7319,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, if (FAILED(hr)) { ERR("Failed to get the adapter's display mode, hr %#x.\n", hr); - IWineD3D_Release(device->wineD3D); + IWineD3D_Release(device->wined3d); return hr; } device->ddraw_width = mode.Width; @@ -7356,7 +7356,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d, if (FAILED(hr)) { ERR("Failed to compile state table, hr %#x.\n", hr); - IWineD3D_Release(device->wineD3D); + IWineD3D_Release(device->wined3d); return hr; } diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 17f336d4966..ea61c597103 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -188,7 +188,8 @@ HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID refguid, void if (data->flags & WINED3DSPD_IUNKNOWN) { *(LPUNKNOWN *)pData = data->ptr.object; - if(((IWineD3DImpl *) This->resource.wineD3DDevice->wineD3D)->dxVersion != 7) { + if (((IWineD3DImpl *)This->resource.wineD3DDevice->wined3d)->dxVersion != 7) + { /* D3D8 and D3D9 addref the private data, DDraw does not. This can't be handled in * ddraw because it doesn't know if the pointer returned is an IUnknown * or just a * Blob diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 41fca71235c..b3cae5454c6 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -730,7 +730,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) if (This->changed.vertexDecl && This->vertexDecl != targetStateBlock->vertexDecl && (This->blockType != WINED3DSBT_RECORDED - || ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion != 9)) + || ((IWineD3DImpl *)This->wineD3DDevice->wined3d)->dxVersion != 9)) { TRACE("Updating vertex declaration from %p to %p.\n", This->vertexDecl, targetStateBlock->vertexDecl); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index bd283af71b6..ed4e9aa3409 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2002,7 +2002,7 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4] if (!pal) { - UINT dxVersion = ((IWineD3DImpl *)device->wineD3D)->dxVersion; + UINT dxVersion = ((IWineD3DImpl *)device->wined3d)->dxVersion; /* In DirectDraw the palette is a property of the surface, there are no such things as device palettes. */ if (dxVersion <= 7) diff --git a/dlls/wined3d/swapchain_base.c b/dlls/wined3d/swapchain_base.c index 132e0bc99c3..6490d78d1df 100644 --- a/dlls/wined3d/swapchain_base.c +++ b/dlls/wined3d/swapchain_base.c @@ -139,7 +139,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface HRESULT hr; TRACE("(%p)->(%p): Calling GetAdapterDisplayMode\n", This, pMode); - hr = IWineD3D_GetAdapterDisplayMode(This->wineD3DDevice->wineD3D, This->wineD3DDevice->adapter->ordinal, pMode); + hr = IWineD3D_GetAdapterDisplayMode(This->wineD3DDevice->wined3d, This->wineD3DDevice->adapter->ordinal, pMode); TRACE("(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)\n", This, pMode->Width, pMode->Height, pMode->RefreshRate, pMode->Format, debug_d3dformat(pMode->Format)); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c2bedd61f93..34f9f33a8ba 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1459,7 +1459,7 @@ struct IWineD3DDeviceImpl /* WineD3D Information */ IUnknown *parent; IWineD3DDeviceParent *device_parent; - IWineD3D *wineD3D; + IWineD3D *wined3d; struct wined3d_adapter *adapter; /* Window styles to restore when switching fullscreen mode */