From d6300a7946e43bc75aae4a7d67a44fc7c164b567 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 00:52:55 -0500 Subject: [PATCH] GDI: video correctly fills the screen now, but resolution is poor. why is it scaled down by half? --- gfx/drivers/gdi_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 84a5fce764..89725e7b42 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, width, height); + HBITMAP bmp = CreateCompatibleBitmap(winDC, pitch, 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, width, height, 0, 0, width, height, + ret = StretchDIBits(memDC, 0, 0, pitch, height, 0, 0, pitch, height, frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); //printf("StretchDIBits: %d\n", ret); @@ -316,7 +316,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, ret = StretchBlt(winDC, 0, 0, mode.width, mode.height, - memDC, 0, 0, width, height, SRCCOPY); + memDC, 0, 0, width, height / 2, SRCCOPY); //printf("BitBlt: %d\n", ret);