From c09996cd22307eaf50000d730331219fc9a99b7e Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 00:54:38 -0500 Subject: [PATCH] GDI: don't need to store the padding --- gfx/drivers/gdi_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 89725e7b42..b010ac4ea4 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -273,7 +273,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, { HDC winDC = GetDC(hwnd); HDC memDC = CreateCompatibleDC(winDC); - HBITMAP bmp = CreateCompatibleBitmap(winDC, pitch, height); + HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); HBITMAP bmp_old; BITMAPINFO *info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); //HBRUSH brush; @@ -308,7 +308,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, else info->bmiHeader.biCompression = BI_RGB; - ret = StretchDIBits(memDC, 0, 0, pitch, height, 0, 0, pitch, height, + ret = StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); //printf("StretchDIBits: %d\n", ret);