Skip to content

Commit

Permalink
Fix a couple of surface desc and ddcaps flags
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Jan 3, 2025
1 parent a15cafa commit e9b25a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7412
#define BUILD_NUMBER 7413
6 changes: 3 additions & 3 deletions ddraw/IDirectDrawTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e9b25a3

Please sign in to comment.