From e9b25a3979896e90ea3087a8aedc3a6f14abd0d6 Mon Sep 17 00:00:00 2001 From: Elisha Riedlinger Date: Fri, 3 Jan 2025 10:19:07 -0800 Subject: [PATCH] Fix a couple of surface desc and ddcaps flags --- Dllmain/BuildNo.rc | 2 +- ddraw/IDirectDrawTypes.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dllmain/BuildNo.rc b/Dllmain/BuildNo.rc index f66da38b..573f2ab9 100644 --- a/Dllmain/BuildNo.rc +++ b/Dllmain/BuildNo.rc @@ -1 +1 @@ -#define BUILD_NUMBER 7412 +#define BUILD_NUMBER 7413 diff --git a/ddraw/IDirectDrawTypes.cpp b/ddraw/IDirectDrawTypes.cpp index d96f3008..047a7100 100644 --- a/ddraw/IDirectDrawTypes.cpp +++ b/ddraw/IDirectDrawTypes.cpp @@ -104,7 +104,7 @@ void ConvertSurfaceDesc(DDSURFACEDESC& Desc, const DDSURFACEDESC2& Desc2) } ConvertCaps(Desc.ddsCaps, Desc2.ddsCaps); // Check for dwFlags that did not get converted - if (Desc.dwFlags != Desc2.dwFlags && (Desc.dwFlags - Desc2.dwFlags) != ((DWORD)DDSD_ZBUFFERBITDEPTH - (DWORD)DDSD_PIXELFORMAT)) + if (Desc.dwFlags != Desc2.dwFlags && (Desc2.dwFlags - Desc.dwFlags) != ((DWORD)DDSD_PIXELFORMAT - (DWORD)DDSD_ZBUFFERBITDEPTH)) { LOG_LIMIT(100, __FUNCTION__ << " Warning: (Desc2->Desc) Removing unsupported flags: " << Logging::hex(Desc2.dwFlags & ~Desc.dwFlags)); } @@ -164,7 +164,7 @@ void ConvertSurfaceDesc(DDSURFACEDESC2& Desc2, const DDSURFACEDESC& Desc) // Extra parameters Desc2.dwTextureStage = 0; // Stage identifier that is used to bind a texture to a specific stage // Check for dwFlags that did not get converted - if (Desc.dwFlags != Desc2.dwFlags && (Desc.dwFlags - Desc2.dwFlags) != ((DWORD)DDSD_ZBUFFERBITDEPTH - (DWORD)DDSD_PIXELFORMAT)) + if (Desc.dwFlags != Desc2.dwFlags && (Desc2.dwFlags - Desc.dwFlags) != ((DWORD)DDSD_PIXELFORMAT - (DWORD)DDSD_ZBUFFERBITDEPTH)) { LOG_LIMIT(100, __FUNCTION__ << " Warning: (Desc->Desc2) Removing unsupported flags: " << Logging::hex(Desc.dwFlags & ~Desc2.dwFlags)); } @@ -418,7 +418,7 @@ void ConvertCaps(DDCAPS& Caps7, D3DCAPS9& Caps9) } // Z-buffer bit depths - if (Caps7.dwCaps & DDCAPS_ZBLTS) + if (Caps7.dwCaps & DDCAPS_3D) { Caps7.dwZBufferBitDepths = DDBD_16 | DDBD_24 | DDBD_32; }