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;
This is wrong.
On Fri Feb 2 05:26:24 2024 +0000, Henri Verbeet wrote:
This is wrong.
What is the right solution?
It seemed like this was a case that you would only hit if you don't have the right hardware for the game (or it's unavailable due to Xephyr, SSH forwarding, etc.), so it seemed reasonable to me to print a loud warning and then pretend that the hardware is a little more compatible than it is.
What is the right solution?
8-bit color mode in the display driver, probably.
This merge request was closed by Alex Henrie.