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 74e3f516bc
.
This commit is contained in:
parent
1f0bb534ec
commit
9651079ff9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue