Commit ff6bf06c authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ddraw: Allow setting system memory surfaces as render targets for software device.

parent bea6b223
......@@ -1898,7 +1898,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
return DDERR_INVALIDCAPS;
}
if (!(target_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
if (device->hardware_device && !(target_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target_impl);
wined3d_mutex_unlock();
......@@ -1974,7 +1974,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
return DDERR_INVALIDPIXELFORMAT;
}
if (!(target_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
if (device->hardware_device && !(target_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target_impl);
IDirectDrawSurface4_AddRef(target);
......@@ -2023,7 +2023,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
return DDERR_INVALIDPIXELFORMAT;
}
if (!(target_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
if (device->hardware_device && !(target_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target_impl);
IDirectDrawSurface_AddRef(target);
......
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