Module: wine Branch: master Commit: 9d127a4d36939079c264ada932863d840b719b8a URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d127a4d36939079c264ada932...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Oct 8 21:32:40 2012 +0200
wined3d: wined3d_surface_set_palette() never fails.
---
dlls/ddraw/surface.c | 7 ++----- dlls/wined3d/surface.c | 6 ++---- include/wine/wined3d.h | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 8f68425..1f64a18 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -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? diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 71beb51..7dae771 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -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, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 42b21e6..c15b25b 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -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,