winport: fix #1590 1 pixel black line on the right side of the emulator

This commit is contained in:
zeromus 2016-09-06 21:17:32 +00:00
parent df7f081cb5
commit de91bcf369
1 changed files with 3 additions and 1 deletions

View File

@ -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;