Module: wine Branch: master Commit: a8ab56941577a01e17b947cddd374ba52ffd8245 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a8ab56941577a01e17b947cddd...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Sep 30 07:59:18 2014 +0200
wined3d: Use wined3d_texture_set_color_key() to manipulate the color-key in surface_blt_special().
---
dlls/wined3d/surface.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 955c1b6..f8ea858 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4116,13 +4116,12 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE else if (flags & WINEDDBLT_KEYSRCOVERRIDE) { /* Use color key from DDBltFx */ - src_surface->container->color_key_flags |= WINEDDSD_CKSRCBLT; - src_surface->container->src_blt_color_key = DDBltFx->ddckSrcColorkey; + wined3d_texture_set_color_key(src_surface->container, WINEDDSD_CKSRCBLT, &DDBltFx->ddckSrcColorkey); } else { /* Do not use color key */ - src_surface->container->color_key_flags &= ~WINEDDSD_CKSRCBLT; + wined3d_texture_set_color_key(src_surface->container, WINEDDSD_CKSRCBLT, NULL); }
surface_blt_to_drawable(device, filter, @@ -4130,8 +4129,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE src_surface, src_rect, dst_surface, dst_rect);
/* Restore the color key parameters */ - src_surface->container->color_key_flags = old_color_key_flags; - src_surface->container->src_blt_color_key = old_blt_key; + wined3d_texture_set_color_key(src_surface->container, WINEDDSD_CKSRCBLT, + (old_color_key_flags & WINEDDSD_CKSRCBLT) ? &old_blt_key : NULL);
surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding); surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);