Fixed surface buffer alignment

This commit is contained in:
akallabeth 2021-07-01 13:38:08 +02:00 committed by akallabeth
parent 645cc8bb69
commit be88fa6705
1 changed files with 2 additions and 2 deletions

View File

@ -40,9 +40,9 @@ rdpShadowSurface* shadow_surface_new(rdpShadowServer* server, UINT16 x, UINT16 y
surface->y = y;
surface->width = width;
surface->height = height;
surface->scanline = ALIGN_SCREEN_SIZE(surface->width, 4) * 4;
surface->scanline = ALIGN_SCREEN_SIZE(surface->width, 32) * 4;
surface->format = PIXEL_FORMAT_BGRX32;
surface->data = (BYTE*)calloc(ALIGN_SCREEN_SIZE(surface->height, 4), surface->scanline);
surface->data = (BYTE*)calloc(ALIGN_SCREEN_SIZE(surface->height, 32), surface->scanline);
if (!surface->data)
{