Module: wine Branch: master Commit: 9651079ff9bd32547408d1b7b7e0e14ff994371e URL: http://source.winehq.org/git/wine.git/?a=commit;h=9651079ff9bd32547408d1b7b7...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Dec 12 10:23:31 2013 +0100
ddraw: Don't set the palette on attached backbuffers in ddraw_surface7_SetPalette().
Tests show this is just wrong. This patch fixes a regression introduced by commit 74e3f516bc331205474835811d3984b9c53b0f35.
---
dlls/ddraw/surface.c | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 6ed335e..a29f068 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -4695,7 +4695,6 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface); struct ddraw_palette *palette_impl = unsafe_impl_from_IDirectDrawPalette(palette); struct ddraw_palette *prev; - HRESULT hr;
TRACE("iface %p, palette %p.\n", iface, palette);
@@ -4721,34 +4720,6 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir wined3d_surface_set_palette(surface->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? */ - if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER) - { - /* For primary surfaces the tree is just a list, so the simpler scheme fits too */ - DDSCAPS2 caps2 = { DDSCAPS_FLIP, 0, 0, 0 }; - struct ddraw_surface *current = surface; - - for (;;) - { - IDirectDrawSurface7 *attach; - - if (FAILED(hr = ddraw_surface7_GetAttachedSurface(¤t->IDirectDrawSurface7_iface, &caps2, &attach))) - break; - - current = impl_from_IDirectDrawSurface7(attach); - if (current == surface) - { - ddraw_surface7_Release(attach); - break; - } - - TRACE("Setting palette on %p.\n", attach); - ddraw_surface7_SetPalette(attach, palette); - ddraw_surface7_Release(attach); - } - } - wined3d_mutex_unlock();
return DD_OK;