Commit 3f5e1d17 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent 442e60b7
...@@ -4282,6 +4282,7 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, ...@@ -4282,6 +4282,7 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device,
static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined3d_device *device, static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined3d_device *device,
struct wined3d_texture *cursor_image, unsigned int sub_resource_idx) struct wined3d_texture *cursor_image, unsigned int sub_resource_idx)
{ {
unsigned int texture_level = sub_resource_idx % cursor_image->level_count;
struct wined3d_sub_resource_data data; struct wined3d_sub_resource_data data;
struct wined3d_resource_desc desc; struct wined3d_resource_desc desc;
struct wined3d_map_desc map_desc; struct wined3d_map_desc map_desc;
...@@ -4304,8 +4305,8 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined ...@@ -4304,8 +4305,8 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined
desc.multisample_quality = 0; desc.multisample_quality = 0;
desc.usage = WINED3DUSAGE_DYNAMIC; desc.usage = WINED3DUSAGE_DYNAMIC;
desc.pool = WINED3D_POOL_DEFAULT; desc.pool = WINED3D_POOL_DEFAULT;
desc.width = cursor_image->sub_resources[sub_resource_idx].resource->width; desc.width = wined3d_texture_get_level_width(cursor_image, texture_level);
desc.height = cursor_image->sub_resources[sub_resource_idx].resource->height; desc.height = wined3d_texture_get_level_height(cursor_image, texture_level);
desc.depth = 1; desc.depth = 1;
desc.size = 0; desc.size = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment