Henri Verbeet : ddraw: Verify that the surface is in video memory in d3d_device_create().
Alexandre Julliard
julliard at winehq.org
Wed Sep 18 15:49:58 CDT 2013
Module: wine
Branch: master
Commit: 4f899571617d3cde94da2e9b54cc53557784b956
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f899571617d3cde94da2e9b54cc53557784b956
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Sep 18 10:57:10 2013 +0200
ddraw: Verify that the surface is in video memory in d3d_device_create().
---
dlls/ddraw/device.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 210a522..9f537c1 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -6762,6 +6762,12 @@ 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, "
More information about the wine-cvs
mailing list