Commit db42c500 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Rename "wineD3DPalette" to "wined3d_palette".

For consistency with other D3D libraries. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3f7e5d64
...@@ -396,7 +396,7 @@ struct ddraw_palette ...@@ -396,7 +396,7 @@ struct ddraw_palette
IDirectDrawPalette IDirectDrawPalette_iface; IDirectDrawPalette IDirectDrawPalette_iface;
LONG ref; LONG ref;
struct wined3d_palette *wineD3DPalette; struct wined3d_palette *wined3d_palette;
struct ddraw *ddraw; struct ddraw *ddraw;
IUnknown *ifaceToRelease; IUnknown *ifaceToRelease;
DWORD flags; DWORD flags;
......
...@@ -85,22 +85,22 @@ static ULONG WINAPI ddraw_palette_AddRef(IDirectDrawPalette *iface) ...@@ -85,22 +85,22 @@ static ULONG WINAPI ddraw_palette_AddRef(IDirectDrawPalette *iface)
*****************************************************************************/ *****************************************************************************/
static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface) static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface)
{ {
struct ddraw_palette *This = impl_from_IDirectDrawPalette(iface); struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface);
ULONG ref = InterlockedDecrement(&This->ref); 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) if (ref == 0)
{ {
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_palette_decref(This->wineD3DPalette); wined3d_palette_decref(palette->wined3d_palette);
if ((This->flags & DDPCAPS_PRIMARYSURFACE) && This->ddraw->primary) if ((palette->flags & DDPCAPS_PRIMARYSURFACE) && palette->ddraw->primary)
This->ddraw->primary->palette = NULL; palette->ddraw->primary->palette = NULL;
if (This->ifaceToRelease) if (palette->ifaceToRelease)
IUnknown_Release(This->ifaceToRelease); IUnknown_Release(palette->ifaceToRelease);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, palette);
} }
return ref; return ref;
...@@ -174,7 +174,7 @@ static HRESULT WINAPI ddraw_palette_SetEntries(IDirectDrawPalette *iface, ...@@ -174,7 +174,7 @@ static HRESULT WINAPI ddraw_palette_SetEntries(IDirectDrawPalette *iface,
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
wined3d_mutex_lock(); 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) if (SUCCEEDED(hr) && palette->flags & DDPCAPS_PRIMARYSURFACE)
ddraw_surface_update_frontbuffer(palette->ddraw->primary, NULL, FALSE); ddraw_surface_update_frontbuffer(palette->ddraw->primary, NULL, FALSE);
...@@ -214,7 +214,7 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface, ...@@ -214,7 +214,7 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface,
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
wined3d_mutex_lock(); 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(); wined3d_mutex_unlock();
return hr; return hr;
...@@ -282,7 +282,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette, ...@@ -282,7 +282,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette,
palette->flags = flags; palette->flags = flags;
if (FAILED(hr = wined3d_palette_create(ddraw->wined3d_device, 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); WARN("Failed to create wined3d palette, hr %#x.\n", hr);
return hr; return hr;
......
...@@ -79,7 +79,7 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE ...@@ -79,7 +79,7 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
return hr; return hr;
} }
if (surface->palette) 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))) if (!(screen_dc = GetDC(NULL)))
{ {
...@@ -472,7 +472,7 @@ static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectD ...@@ -472,7 +472,7 @@ static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectD
if (palette_impl) if (palette_impl)
palette_impl->flags |= DDPCAPS_PRIMARYSURFACE; palette_impl->flags |= DDPCAPS_PRIMARYSURFACE;
wined3d_swapchain_set_palette(surface->ddraw->wined3d_swapchain, 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); ddraw_surface_update_frontbuffer(surface, NULL, FALSE);
} }
if (palette_impl) if (palette_impl)
...@@ -2162,7 +2162,7 @@ static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc) ...@@ -2162,7 +2162,7 @@ static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc)
palette = NULL; palette = NULL;
if (palette) if (palette)
wined3d_palette_apply_to_dc(palette->wineD3DPalette, *dc); wined3d_palette_apply_to_dc(palette->wined3d_palette, *dc);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment