Skip to content

Commit

Permalink
add workaround 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 2c2fd7f commit 6ec7c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ddsurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6ec7c0c

Please sign in to comment.