mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 07:37:02 +00:00
ddraw: Rename "wineD3DPalette" to "wined3d_palette".
For consistency with other D3D libraries. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3f7e5d647e
commit
db42c500e2
3 changed files with 16 additions and 16 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue