Stefan Dösinger : wined3d: Update the device palette if the primary palette is changed.
Module: wine Branch: refs/heads/master Commit: d89080c67142cd693346f25753b07ad69ba66a16 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d89080c67142cd693346f257... Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue May 9 20:47:03 2006 +0200 wined3d: Update the device palette if the primary palette is changed. --- dlls/wined3d/palette.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index 0ff130f..a83ff77 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -142,6 +142,17 @@ #endif } } + /* 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; }
participants (1)
-
Alexandre Julliard