We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ec7c0c commit 33f2b91Copy full SHA for 33f2b91
src/ddsurface.c
@@ -1553,7 +1553,8 @@ HRESULT dd_CreateSurface(
1553
if (dst_surface->hdc)
1554
InterlockedIncrement(&g_dds_gdi_handles);
1555
1556
- 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);
1557
+ DWORD map_offset = min(65280, dst_surface->pitch * g_config.guard_lines);
1558
1559
dst_surface->mapping =
1560
CreateFileMappingA(
0 commit comments