Skip to content

Commit

Permalink
tweak workaound for CreateDIBSection offset bug
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Jan 19, 2025
1 parent 6ec7c0c commit 33f2b91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ddsurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 33f2b91

Please sign in to comment.