Roderick Colenbrander : wined3d: Only store the palette index in the alpha component when the primary render target uses P8 .

Alexandre Julliard julliard at winehq.org
Fri Dec 28 07:38:45 CST 2007


Module: wine
Branch: master
Commit: f3df6cf42b4e705b5e687df08b9f8c3ff8b2d41c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f3df6cf42b4e705b5e687df08b9f8c3ff8b2d41c

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Sun Dec 23 20:51:58 2007 +0100

wined3d: Only store the palette index in the alpha component when the primary render target uses P8.

This was already done in other places but I missed this spot.

---

 dlls/wined3d/surface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index df89db9..24cc14d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1931,7 +1931,7 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4]
     if (device->render_targets && device->render_targets[0]) {
         IWineD3DSurfaceImpl* render_target = (IWineD3DSurfaceImpl*)device->render_targets[0];
 
-        if(render_target->resource.usage & WINED3DUSAGE_RENDERTARGET)
+        if((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET) && (render_target->resource.format == WINED3DFMT_P8))
             index_in_alpha = TRUE;
     }
 




More information about the wine-cvs mailing list