Commit 9e44fadb authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Set the cube map flags for the root surface in ddraw_surface_create_texture() as well.

parent 80055e1f
......@@ -3060,13 +3060,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
desc2.ddsCaps.dwCaps |= DDSCAPS_FRONTBUFFER;
}
/* The root surface in a cube map is positive x */
if(desc2.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP)
{
desc2.ddsCaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES;
desc2.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEX;
}
if ((desc2.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) && (ddraw->cooperative_level & DDSCL_EXCLUSIVE))
{
struct wined3d_swapchain_desc swapchain_desc;
......
......@@ -5744,10 +5744,6 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
{
resource = wined3d_texture_get_sub_resource(wined3d_texture, i * levels + j);
mip = wined3d_resource_get_parent(resource);
if (mip == root)
continue;
mip_desc = &mip->surface_desc;
if (j)
......@@ -5783,6 +5779,9 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
}
if (mip == root)
continue;
*attach = mip;
attach = &mip->complex_array[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