Commit a8ab5694 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use wined3d_texture_set_color_key() to manipulate the color-key in surface_blt_special().

parent b3ebdd90
...@@ -4116,13 +4116,12 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE ...@@ -4116,13 +4116,12 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
else if (flags & WINEDDBLT_KEYSRCOVERRIDE) else if (flags & WINEDDBLT_KEYSRCOVERRIDE)
{ {
/* Use color key from DDBltFx */ /* Use color key from DDBltFx */
src_surface->container->color_key_flags |= WINEDDSD_CKSRCBLT; wined3d_texture_set_color_key(src_surface->container, WINEDDSD_CKSRCBLT, &DDBltFx->ddckSrcColorkey);
src_surface->container->src_blt_color_key = DDBltFx->ddckSrcColorkey;
} }
else else
{ {
/* Do not use color key */ /* 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, surface_blt_to_drawable(device, filter,
...@@ -4130,8 +4129,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE ...@@ -4130,8 +4129,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
src_surface, src_rect, dst_surface, dst_rect); src_surface, src_rect, dst_surface, dst_rect);
/* Restore the color key parameters */ /* Restore the color key parameters */
src_surface->container->color_key_flags = old_color_key_flags; wined3d_texture_set_color_key(src_surface->container, WINEDDSD_CKSRCBLT,
src_surface->container->src_blt_color_key = old_blt_key; (old_color_key_flags & WINEDDSD_CKSRCBLT) ? &old_blt_key : NULL);
surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding); surface_validate_location(dst_surface, dst_surface->container->resource.draw_binding);
surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding); surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment