diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1ada36ee0a7..bb3a23b7267 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4271,10 +4271,7 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device state->viewport.max_z = 1.0f; wined3d_cs_emit_set_viewport(device->cs, &state->viewport); - state->scissor_rect.top = 0; - state->scissor_rect.left = 0; - state->scissor_rect.right = view->width; - state->scissor_rect.bottom = view->height; + SetRect(&state->scissor_rect, 0, 0, view->width, view->height); wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } @@ -4928,10 +4925,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, state->viewport.height = view->height; wined3d_cs_emit_set_viewport(device->cs, &state->viewport); - state->scissor_rect.top = 0; - state->scissor_rect.left = 0; - state->scissor_rect.right = view->width; - state->scissor_rect.bottom = view->height; + SetRect(&state->scissor_rect, 0, 0, view->width, view->height); wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 781006f6f26..ab4ee172e69 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -216,10 +216,8 @@ static void surface_get_rect(const struct wined3d_surface *surface, const RECT * { const struct wined3d_texture *texture = surface->container; - rect_out->left = 0; - rect_out->top = 0; - rect_out->right = wined3d_texture_get_level_width(texture, surface->texture_level); - rect_out->bottom = wined3d_texture_get_level_height(texture, surface->texture_level); + SetRect(rect_out, 0, 0, wined3d_texture_get_level_width(texture, surface->texture_level), + wined3d_texture_get_level_height(texture, surface->texture_level)); } } diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 1f0a97aae08..865fb4dc366 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2602,10 +2602,7 @@ HRESULT CDECL wined3d_texture_set_overlay_position(struct wined3d_texture *textu surface = sub_resource->u.surface; w = surface->overlay_destrect.right - surface->overlay_destrect.left; h = surface->overlay_destrect.bottom - surface->overlay_destrect.top; - surface->overlay_destrect.left = x; - surface->overlay_destrect.top = y; - surface->overlay_destrect.right = x + w; - surface->overlay_destrect.bottom = y + h; + SetRect(&surface->overlay_destrect, x, y, x + w, y + h); return WINED3D_OK; }