From 6b89064242e1d589dff852eb17657464448cec82 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 12 Jan 2017 15:25:06 -0500 Subject: [PATCH] GDI: no more alternating black lines, but now video only takes up half the window --- 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 dcea853531..f4ca0e9d63 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -267,7 +267,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, GetClientRect(hwnd, &rect); video_context_driver_get_video_size(&mode); - //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height); + //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d pitch %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height, pitch); if (draw) { @@ -289,11 +289,11 @@ static bool gdi_gfx_frame(void *data, const void *frame, ZeroMemory(&info, sizeof(BITMAPINFO)); info.bmiHeader.biBitCount = bits; - info.bmiHeader.biWidth = width; + info.bmiHeader.biWidth = pitch; info.bmiHeader.biHeight = -height; info.bmiHeader.biPlanes = 1; info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info.bmiHeader.biSizeImage = 0;//pitch * height; + info.bmiHeader.biSizeImage = 0; info.bmiHeader.biCompression = BI_RGB; /* if (gdi_rgb32)