From 6f865d3ea5b4db6930962b4ad56ebb88a2847e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Fri, 29 Nov 2013 12:59:15 +0100 Subject: [PATCH] wined3d: Don't pass the pitch to read_from_framebuffer. --- dlls/wined3d/surface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 0cdcbbacef8..5ff3b0d9f7c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3438,7 +3438,7 @@ HRESULT CDECL wined3d_surface_flip(struct wined3d_surface *surface, struct wined } /* Read the framebuffer back into the surface */ -static void read_from_framebuffer(struct wined3d_surface *surface, UINT pitch) +static void read_from_framebuffer(struct wined3d_surface *surface) { struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info; @@ -3451,6 +3451,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, UINT pitch) BOOL bpp; BOOL srcIsUpsideDown; struct wined3d_bo_address data; + UINT pitch = wined3d_surface_get_pitch(surface); surface_get_memory(surface, &data); @@ -5020,7 +5021,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface, if (surface->flags & SFLAG_INDRAWABLE) { - read_from_framebuffer(surface, wined3d_surface_get_pitch(surface)); + read_from_framebuffer(surface); return; }