wined3d: wined3d_surface_set_palette() never fails.

This commit is contained in:
Henri Verbeet 2012-10-08 21:32:40 +02:00 committed by Alexandre Julliard
parent 7cea4645c5
commit 9d127a4d36
3 changed files with 5 additions and 10 deletions

View File

@ -4712,11 +4712,8 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir
/* Update the wined3d frontbuffer if this is the frontbuffer. */
if ((This->surface_desc.ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER) && This->ddraw->wined3d_frontbuffer)
{
hr = wined3d_surface_set_palette(This->ddraw->wined3d_frontbuffer, palette_impl ? palette_impl->wineD3DPalette : NULL);
if (FAILED(hr))
ERR("Failed to set frontbuffer palette, hr %#x.\n", hr);
}
wined3d_surface_set_palette(This->ddraw->wined3d_frontbuffer,
palette_impl ? palette_impl->wineD3DPalette : NULL);
/* If this is a front buffer, also update the back buffers
* TODO: How do things work for palettized cube textures?

View File

@ -3150,14 +3150,14 @@ HRESULT CDECL wined3d_surface_restore(struct wined3d_surface *surface)
return WINED3D_OK;
}
HRESULT CDECL wined3d_surface_set_palette(struct wined3d_surface *surface, struct wined3d_palette *palette)
void CDECL wined3d_surface_set_palette(struct wined3d_surface *surface, struct wined3d_palette *palette)
{
TRACE("surface %p, palette %p.\n", surface, palette);
if (surface->palette == palette)
{
TRACE("Nop palette change.\n");
return WINED3D_OK;
return;
}
if (surface->palette && (surface->resource.usage & WINED3DUSAGE_RENDERTARGET))
@ -3172,8 +3172,6 @@ HRESULT CDECL wined3d_surface_set_palette(struct wined3d_surface *surface, struc
surface->surface_ops->surface_realize_palette(surface);
}
return WINED3D_OK;
}
HRESULT CDECL wined3d_surface_set_color_key(struct wined3d_surface *surface,

View File

@ -2344,7 +2344,7 @@ HRESULT __cdecl wined3d_surface_set_color_key(struct wined3d_surface *surface,
DWORD flags, const struct wined3d_color_key *color_key);
HRESULT __cdecl wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem);
HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y);
HRESULT __cdecl wined3d_surface_set_palette(struct wined3d_surface *surface, struct wined3d_palette *palette);
void __cdecl wined3d_surface_set_palette(struct wined3d_surface *surface, struct wined3d_palette *palette);
DWORD __cdecl wined3d_surface_set_priority(struct wined3d_surface *surface, DWORD new_priority);
HRESULT __cdecl wined3d_surface_unmap(struct wined3d_surface *surface);
HRESULT __cdecl wined3d_surface_update_desc(struct wined3d_surface *surface,