wined3d: Catch NOP palette changes.

This commit is contained in:
Stefan Dösinger 2008-02-25 10:59:53 +01:00 committed by Alexandre Julliard
parent 90a654aede
commit dd997c1de6
1 changed files with 5 additions and 0 deletions

View File

@ -197,6 +197,11 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD
IWineD3DPaletteImpl *PalImpl = (IWineD3DPaletteImpl *) Pal;
TRACE("(%p)->(%p)\n", This, Pal);
if(This->palette == PalImpl) {
TRACE("Nop palette change\n");
return WINED3D_OK;
}
if(This->palette != NULL)
if(This->resource.usage & WINED3DUSAGE_RENDERTARGET)
This->palette->Flags &= ~WINEDDPCAPS_PRIMARYSURFACE;