From de91bcf3699b756fa0c26ad1db3109f0131c8378 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 6 Sep 2016 21:17:32 +0000 Subject: [PATCH] winport: fix #1590 1 pixel black line on the right side of the emulator --- desmume/src/windows/CWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desmume/src/windows/CWindow.cpp b/desmume/src/windows/CWindow.cpp index d6af59235..b9edfe540 100644 --- a/desmume/src/windows/CWindow.cpp +++ b/desmume/src/windows/CWindow.cpp @@ -621,8 +621,10 @@ static void MyAdjustWindowRectEx(RECT* rect, HWND hwnd) ZeroMemory(&mbi, sizeof(mbi)); mbi.cbSize = sizeof(mbi); GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi); - //int menuHeight = (mbi.rcBar.bottom - mbi.rcBar.top + 1); //zero 07-aug-2016 - why did I do this? it isn't normal in windows and in the case of no menu bar it was making a 1 instead of a 0 (r3184 in 2009) + + //if the menubar exists, its height is off by 1 (frame between bar and client area?) int menuHeight = (mbi.rcBar.bottom - mbi.rcBar.top); + if(menuHeight != 0) menuHeight++; rect->bottom -= cymenu; rect->bottom += menuHeight;