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

add guard lines on both on top and bottom of the buffer

This commit is contained in:
FunkyFr3sh 2025-01-19 05:32:07 +01:00
parent 30e6010a88
commit 14336e8d39

View File

@ -1553,17 +1553,17 @@ HRESULT dd_CreateSurface(
if (dst_surface->hdc)
InterlockedIncrement(&g_dds_gdi_handles);
DWORD map_offset = dst_surface->pitch * g_config.guard_lines;
dst_surface->mapping =
CreateFileMappingA(
INVALID_HANDLE_VALUE,
NULL,
PAGE_READWRITE | SEC_COMMIT,
0,
bmp_size + 256,
bmp_size + 256 + map_offset,
NULL);
DWORD map_offset = 0;
if (dst_surface->mapping)
{
LPVOID data = MapViewOfFile(dst_surface->mapping, FILE_MAP_ALL_ACCESS, 0, 0, 0);