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

add workaround for CreateDIBSection offset bug

This commit is contained in:
FunkyFr3sh 2025-01-19 08:03:09 +01:00
parent 2c2fd7feb6
commit 6ec7c0c701

View File

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