wined3d: Update the device palette if the primary palette is changed.

This commit is contained in:
Stefan Dösinger 2006-05-09 20:47:03 +02:00 committed by Alexandre Julliard
parent 275a0c2f2d
commit d89080c671
1 changed files with 11 additions and 0 deletions

View File

@ -142,6 +142,17 @@ HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, DWORD Flag
}
}
/* If the palette is the primary palette, set the entries to the device */
if(This->Flags & DDPCAPS_PRIMARYSURFACE) {
unsigned int i;
IWineD3DDeviceImpl *device = This->wineD3DDevice;
PALETTEENTRY *entry = PalEnt;
for(i = Start; i < Start+Count; i++) {
device->palettes[device->currentPalette][i] = *entry++;
}
}
return WINED3D_OK;
}