Henri Verbeet : wined3d: Use the texture dimension helpers in surface_get_rect().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 4 10:37:01 CDT 2016
Module: wine
Branch: master
Commit: a138460fc578c5b40b68f062acdd9a6a9a1b70a3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a138460fc578c5b40b68f062acdd9a6a9a1b70a3
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Apr 3 15:30:55 2016 +0200
wined3d: Use the texture dimension helpers in surface_get_rect().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/surface.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 04f30c6..5a84564 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -277,10 +277,12 @@ static void surface_get_rect(const struct wined3d_surface *surface, const RECT *
*rect_out = *rect_in;
else
{
+ const struct wined3d_texture *texture = surface->container;
+
rect_out->left = 0;
rect_out->top = 0;
- rect_out->right = surface->resource.width;
- rect_out->bottom = surface->resource.height;
+ rect_out->right = wined3d_texture_get_level_width(texture, surface->texture_level);
+ rect_out->bottom = wined3d_texture_get_level_height(texture, surface->texture_level);
}
}
More information about the wine-cvs
mailing list