From: Alex Henrie alexhenrie24@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56232 --- dlls/ddraw/surface.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index d0c4bf67cbc..af5b0c76cdf 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -6834,6 +6834,12 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ levels = 1; }
+ if ((ddraw->flags & DDRAW_NO3D) && (desc->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) + { + ERR("Video memory surfaces not supported without 3D support.\n"); + desc->ddsCaps.dwCaps &= ~(DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_NONLOCALVIDMEM); + } + if (!(desc->ddsCaps.dwCaps & (DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY))) { if (!(desc->ddsCaps.dwCaps2 & (DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE))) @@ -6946,13 +6952,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ return DDERR_NOCOLORKEYHW; }
- if ((ddraw->flags & DDRAW_NO3D) && (desc->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY)) - { - WARN("Video memory surfaces not supported without 3D support.\n"); - free(texture); - return DDERR_NODIRECTDRAWHW; - } - if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) layers = 6;