mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
tweak workaound for CreateDIBSection offset bug
This commit is contained in:
parent
6ec7c0c701
commit
33f2b91c99
@ -1553,7 +1553,8 @@ HRESULT dd_CreateSurface(
|
|||||||
if (dst_surface->hdc)
|
if (dst_surface->hdc)
|
||||||
InterlockedIncrement(&g_dds_gdi_handles);
|
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 =
|
dst_surface->mapping =
|
||||||
CreateFileMappingA(
|
CreateFileMappingA(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user