wined3d: Use RECT instead of WINED3DRECT in more parts of BltOverride.
This commit is contained in:
parent
682c969e9a
commit
a91f844a3d
|
@ -3769,6 +3769,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||||
WINED3DRECT rect;
|
WINED3DRECT rect;
|
||||||
IWineD3DSwapChainImpl *srcSwapchain = NULL, *dstSwapchain = NULL;
|
IWineD3DSwapChainImpl *srcSwapchain = NULL, *dstSwapchain = NULL;
|
||||||
IWineD3DSurfaceImpl *Src = (IWineD3DSurfaceImpl *) SrcSurface;
|
IWineD3DSurfaceImpl *Src = (IWineD3DSurfaceImpl *) SrcSurface;
|
||||||
|
RECT dst_rect;
|
||||||
|
|
||||||
TRACE("(%p)->(%p,%p,%p,%08x,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx);
|
TRACE("(%p)->(%p,%p,%p,%08x,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx);
|
||||||
|
|
||||||
|
@ -3813,6 +3814,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||||
rect.x2 = This->currentDesc.Width;
|
rect.x2 = This->currentDesc.Width;
|
||||||
rect.y2 = This->currentDesc.Height;
|
rect.y2 = This->currentDesc.Height;
|
||||||
}
|
}
|
||||||
|
surface_get_rect(This, DestRect, &dst_rect);
|
||||||
|
|
||||||
/* The only case where both surfaces on a swapchain are supported is a back buffer -> front buffer blit on the same swapchain */
|
/* The only case where both surfaces on a swapchain are supported is a back buffer -> front buffer blit on the same swapchain */
|
||||||
if(dstSwapchain && dstSwapchain == srcSwapchain && dstSwapchain->backBuffer &&
|
if(dstSwapchain && dstSwapchain == srcSwapchain && dstSwapchain->backBuffer &&
|
||||||
|
@ -4108,9 +4110,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||||
ClientToScreen(context->win_handle, &offset);
|
ClientToScreen(context->win_handle, &offset);
|
||||||
GetClientRect(context->win_handle, &windowsize);
|
GetClientRect(context->win_handle, &windowsize);
|
||||||
h = windowsize.bottom - windowsize.top;
|
h = windowsize.bottom - windowsize.top;
|
||||||
rect.x1 -= offset.x; rect.x2 -=offset.x;
|
dst_rect.left -= offset.x; dst_rect.right -=offset.x;
|
||||||
rect.y1 -= offset.y; rect.y2 -=offset.y;
|
dst_rect.top -= offset.y; dst_rect.bottom -=offset.y;
|
||||||
rect.y1 += This->currentDesc.Height - h; rect.y2 += This->currentDesc.Height - h;
|
dst_rect.top += This->currentDesc.Height - h; dst_rect.bottom += This->currentDesc.Height - h;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_identity_fixup(This->resource.format_desc->color_fixup))
|
if (!is_identity_fixup(This->resource.format_desc->color_fixup))
|
||||||
|
@ -4152,7 +4154,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||||
|
|
||||||
/* Draw a textured quad
|
/* Draw a textured quad
|
||||||
*/
|
*/
|
||||||
draw_textured_quad(Src, &SourceRectangle, (RECT*)&rect, Filter);
|
draw_textured_quad(Src, &SourceRectangle, &dst_rect, Filter);
|
||||||
|
|
||||||
if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) {
|
if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) {
|
||||||
glDisable(GL_ALPHA_TEST);
|
glDisable(GL_ALPHA_TEST);
|
||||||
|
@ -4205,10 +4207,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||||
!(This == (IWineD3DSurfaceImpl*) dstSwapchain->frontBuffer ||
|
!(This == (IWineD3DSurfaceImpl*) dstSwapchain->frontBuffer ||
|
||||||
(dstSwapchain->backBuffer && This == (IWineD3DSurfaceImpl*) dstSwapchain->backBuffer[0]))) {
|
(dstSwapchain->backBuffer && This == (IWineD3DSurfaceImpl*) dstSwapchain->backBuffer[0]))) {
|
||||||
TRACE("Surface is higher back buffer, falling back to software\n");
|
TRACE("Surface is higher back buffer, falling back to software\n");
|
||||||
return cpu_blit.color_fill(myDevice, This, (RECT*)&rect, color);
|
return cpu_blit.color_fill(myDevice, This, &dst_rect, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ffp_blit.color_fill(myDevice, This, (RECT*)&rect, color);
|
return ffp_blit.color_fill(myDevice, This, &dst_rect, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue