From 43a9734ba2cc01ad85fdc4645fe2fe1258c001e7 Mon Sep 17 00:00:00 2001 From: retr0s4ge Date: Fri, 13 Jul 2018 16:43:43 +0200 Subject: [PATCH] Fill the areas above and below the resized screen with black when using DirectDraw display method. This is needed to remove garbage from the window after resizing the screen. OpenGL display method already does this. --- desmume/src/frontend/windows/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index e5aa655a3..a92eec6c9 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -1952,6 +1952,11 @@ static void DD_DoDisplay() DD_FillRect(ddraw.surface.primary,0,bottom,left,wr.bottom,RGB(0,0,128)); //bottomleft DD_FillRect(ddraw.surface.primary,left,bottom,right,wr.bottom,RGB(255,0,255)); //bottomcenter DD_FillRect(ddraw.surface.primary,right,bottom,wr.right,wr.bottom,RGB(0,255,255)); //bottomright + if (video.layout == 1) + { + DD_FillRect(ddraw.surface.primary, SubScreenRect.left, wr.top, wr.right, SubScreenRect.top, RGB(0, 0, 0)); //Top gap left when centering the resized screen + DD_FillRect(ddraw.surface.primary, SubScreenRect.left, SubScreenRect.bottom, wr.right, wr.bottom, RGB(0, 0, 0)); //Bottom gap left when centering the resized screen + } } }