wined3d: Use the texture dimension helpers in surface_get_rect().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-04-03 15:30:55 +02:00 committed by Alexandre Julliard
parent c2900cd8ba
commit a138460fc5
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}