Commit 15657288 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Check for DDRAW_NO3D before checking for a video memory surface in d3d_device_create().

While slightly odd, this matches what the tests expect. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent fbcdf8c6
......@@ -6986,18 +6986,18 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
return DDERR_NOPALETTEATTACHED;
}
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
}
if (ddraw->flags & DDRAW_NO3D)
{
ERR_(winediag)("The application wants to create a Direct3D device, "
"but the current DirectDrawRenderer does not support this.\n");
return DDERR_NO3D;
return DDERR_OUTOFMEMORY;
}
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
}
if (ddraw->d3ddevice)
......
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