While slightly odd, this matches what the tests expect.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/ddraw/device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 5db0b81a819..7866c281465 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -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)
On Thu, 27 Sep 2018 at 11:46, Henri Verbeet hverbeet@codeweavers.com wrote:
While slightly odd, this matches what the tests expect.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
dlls/ddraw/device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 5db0b81a819..7866c281465 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -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;
Is it supposed to return out of memory when DDRAW_NO3D is set? I didn't get that from the commit message.
}
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
{
WARN("Surface %p is not in video memory.\n", target);
return D3DERR_SURFACENOTINVIDMEM;
}
if (ddraw->d3ddevice)
-- 2.11.0
On 28 September 2018 at 04:07, Mathew Hodson mathew.hodson@gmail.com wrote:
On Thu, 27 Sep 2018 at 11:46, Henri Verbeet hverbeet@codeweavers.com wrote:
return DDERR_NO3D;
return DDERR_OUTOFMEMORY;
Is it supposed to return out of memory when DDRAW_NO3D is set? I didn't get that from the commit message.
Yeah. The commit message didn't quite spell it out, but see e.g. [1] and [2].
[1] https://test.winehq.org/data/d8f3f1b71726b793f2f9a86225a73a7d286e62b3/win7_n... [2] https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ddraw/tests/d3d.c#l15...