From b4b2a29dec805f3970432c43fe48266ebd633730 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 15 Jun 2015 14:07:32 +0200 Subject: [PATCH] wined3d: Use surface_get_rect() in wined3d_surface_update_overlay(). --- dlls/wined3d/surface.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 4df6ca8ccef..c6d5a5adddd 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2029,29 +2029,8 @@ HRESULT CDECL wined3d_surface_update_overlay(struct wined3d_surface *surface, co return WINED3DERR_INVALIDCALL; } - if (src_rect) - { - surface->overlay_srcrect = *src_rect; - } - else - { - surface->overlay_srcrect.left = 0; - surface->overlay_srcrect.top = 0; - surface->overlay_srcrect.right = surface->resource.width; - surface->overlay_srcrect.bottom = surface->resource.height; - } - - if (dst_rect) - { - surface->overlay_destrect = *dst_rect; - } - else - { - surface->overlay_destrect.left = 0; - surface->overlay_destrect.top = 0; - surface->overlay_destrect.right = dst_surface->resource.width; - surface->overlay_destrect.bottom = dst_surface->resource.height; - } + surface_get_rect(surface, src_rect, &surface->overlay_srcrect); + surface_get_rect(dst_surface, dst_rect, &surface->overlay_destrect); if (surface->overlay_dest && (surface->overlay_dest != dst_surface || flags & WINEDDOVER_HIDE)) {