From db42c500e2ced9e90ec28efe8cd4c9f71f7661b1 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 26 Aug 2016 13:51:21 +0200 Subject: [PATCH] ddraw: Rename "wineD3DPalette" to "wined3d_palette". For consistency with other D3D libraries. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/ddraw/ddraw_private.h | 2 +- dlls/ddraw/palette.c | 24 ++++++++++++------------ dlls/ddraw/surface.c | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 667dcd0d2b4..f7b8cd081ef 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -396,7 +396,7 @@ struct ddraw_palette IDirectDrawPalette IDirectDrawPalette_iface; LONG ref; - struct wined3d_palette *wineD3DPalette; + struct wined3d_palette *wined3d_palette; struct ddraw *ddraw; IUnknown *ifaceToRelease; DWORD flags; diff --git a/dlls/ddraw/palette.c b/dlls/ddraw/palette.c index e62f737e434..3424723307d 100644 --- a/dlls/ddraw/palette.c +++ b/dlls/ddraw/palette.c @@ -85,22 +85,22 @@ static ULONG WINAPI ddraw_palette_AddRef(IDirectDrawPalette *iface) *****************************************************************************/ static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface) { - struct ddraw_palette *This = impl_from_IDirectDrawPalette(iface); - ULONG ref = InterlockedDecrement(&This->ref); + struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface); + ULONG ref = InterlockedDecrement(&palette->ref); - TRACE("%p decreasing refcount to %u.\n", This, ref); + TRACE("%p decreasing refcount to %u.\n", palette, ref); if (ref == 0) { wined3d_mutex_lock(); - wined3d_palette_decref(This->wineD3DPalette); - if ((This->flags & DDPCAPS_PRIMARYSURFACE) && This->ddraw->primary) - This->ddraw->primary->palette = NULL; - if (This->ifaceToRelease) - IUnknown_Release(This->ifaceToRelease); + wined3d_palette_decref(palette->wined3d_palette); + if ((palette->flags & DDPCAPS_PRIMARYSURFACE) && palette->ddraw->primary) + palette->ddraw->primary->palette = NULL; + if (palette->ifaceToRelease) + IUnknown_Release(palette->ifaceToRelease); wined3d_mutex_unlock(); - HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, palette); } return ref; @@ -174,7 +174,7 @@ static HRESULT WINAPI ddraw_palette_SetEntries(IDirectDrawPalette *iface, return DDERR_INVALIDPARAMS; wined3d_mutex_lock(); - hr = wined3d_palette_set_entries(palette->wineD3DPalette, flags, start, count, entries); + hr = wined3d_palette_set_entries(palette->wined3d_palette, flags, start, count, entries); if (SUCCEEDED(hr) && palette->flags & DDPCAPS_PRIMARYSURFACE) ddraw_surface_update_frontbuffer(palette->ddraw->primary, NULL, FALSE); @@ -214,7 +214,7 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface, return DDERR_INVALIDPARAMS; wined3d_mutex_lock(); - hr = wined3d_palette_get_entries(palette->wineD3DPalette, flags, start, count, entries); + hr = wined3d_palette_get_entries(palette->wined3d_palette, flags, start, count, entries); wined3d_mutex_unlock(); return hr; @@ -282,7 +282,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette, palette->flags = flags; if (FAILED(hr = wined3d_palette_create(ddraw->wined3d_device, - wined3d_flags, entry_count, entries, &palette->wineD3DPalette))) + wined3d_flags, entry_count, entries, &palette->wined3d_palette))) { WARN("Failed to create wined3d palette, hr %#x.\n", hr); return hr; diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index db03303d68e..29899885df7 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -79,7 +79,7 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE return hr; } if (surface->palette) - wined3d_palette_apply_to_dc(surface->palette->wineD3DPalette, surface_dc); + wined3d_palette_apply_to_dc(surface->palette->wined3d_palette, surface_dc); if (!(screen_dc = GetDC(NULL))) { @@ -472,7 +472,7 @@ static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectD if (palette_impl) palette_impl->flags |= DDPCAPS_PRIMARYSURFACE; wined3d_swapchain_set_palette(surface->ddraw->wined3d_swapchain, - palette_impl ? palette_impl->wineD3DPalette : NULL); + palette_impl ? palette_impl->wined3d_palette : NULL); ddraw_surface_update_frontbuffer(surface, NULL, FALSE); } if (palette_impl) @@ -2162,7 +2162,7 @@ static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc) palette = NULL; if (palette) - wined3d_palette_apply_to_dc(palette->wineD3DPalette, *dc); + wined3d_palette_apply_to_dc(palette->wined3d_palette, *dc); } }