1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-14 22:03:27 +01:00

tweak workaound for CreateDIBSection offset bug

This commit is contained in:
FunkyFr3sh 2025-01-19 09:27:26 +01:00
parent 6ec7c0c701
commit 33f2b91c99

View File

@ -1553,7 +1553,8 @@ HRESULT dd_CreateSurface(
if (dst_surface->hdc)
InterlockedIncrement(&g_dds_gdi_handles);
DWORD map_offset = 65280; // CreateDIBSection cannot handle values higher than a WORD - 0xFF00 (guard lines);
// CreateDIBSection cannot handle values higher than a WORD - 0xFF00 (guard lines);
DWORD map_offset = min(65280, dst_surface->pitch * g_config.guard_lines);
dst_surface->mapping =
CreateFileMappingA(