FIXED: OpenGL had black border at top in fullscreen
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@478 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
e1074995d9
commit
eea7aa1d08
|
@ -250,7 +250,6 @@ VBA::VBA()
|
||||||
showRenderedFrames = 0;
|
showRenderedFrames = 0;
|
||||||
screenMessage = false;
|
screenMessage = false;
|
||||||
screenMessageTime = 0;
|
screenMessageTime = 0;
|
||||||
menuToggle = true;
|
|
||||||
display = NULL;
|
display = NULL;
|
||||||
menu = NULL;
|
menu = NULL;
|
||||||
popup = NULL;
|
popup = NULL;
|
||||||
|
@ -602,27 +601,20 @@ void VBA::adjustDestRect()
|
||||||
dest.right -= windowPositionX;
|
dest.right -= windowPositionX;
|
||||||
}
|
}
|
||||||
|
|
||||||
int menuSkip = 0;
|
|
||||||
|
|
||||||
if(videoOption >= VIDEO_320x240 && menuToggle) {
|
|
||||||
int m = GetSystemMetrics(SM_CYMENU);
|
|
||||||
menuSkip = m;
|
|
||||||
dest.bottom -=m;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(videoOption > VIDEO_4X) {
|
if(videoOption > VIDEO_4X) {
|
||||||
int top = (fsHeight - surfaceSizeY) / 2;
|
if(fullScreenStretch) {
|
||||||
int left = (fsWidth - surfaceSizeX) / 2;
|
dest.top = 0;
|
||||||
dest.top += top;
|
dest.left = 0;
|
||||||
dest.bottom += top;
|
dest.right = fsWidth;
|
||||||
dest.left += left;
|
dest.bottom = fsHeight;
|
||||||
dest.right += left;
|
} else {
|
||||||
if(fullScreenStretch) {
|
int top = (fsHeight - surfaceSizeY) / 2;
|
||||||
dest.top = 0+menuSkip;
|
int left = (fsWidth - surfaceSizeX) / 2;
|
||||||
dest.left = 0;
|
dest.top += top;
|
||||||
dest.right = fsWidth;
|
dest.bottom += top;
|
||||||
dest.bottom = fsHeight;
|
dest.left += left;
|
||||||
}
|
dest.right += left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1926,7 +1918,6 @@ void VBA::updateWindowSize(int value)
|
||||||
|
|
||||||
style |= WS_OVERLAPPEDWINDOW;
|
style |= WS_OVERLAPPEDWINDOW;
|
||||||
|
|
||||||
menuToggle = TRUE;
|
|
||||||
AdjustWindowRectEx(&dest, style, TRUE, 0); //WS_EX_TOPMOST);
|
AdjustWindowRectEx(&dest, style, TRUE, 0); //WS_EX_TOPMOST);
|
||||||
|
|
||||||
winSizeX = dest.right-dest.left;
|
winSizeX = dest.right-dest.left;
|
||||||
|
@ -1944,7 +1935,7 @@ void VBA::updateWindowSize(int value)
|
||||||
info.cbSize = sizeof(MENUBARINFO);
|
info.cbSize = sizeof(MENUBARINFO);
|
||||||
GetMenuBarInfo( theApp.m_pMainWnd->GetSafeHwnd(), OBJID_MENU, 0, &info );
|
GetMenuBarInfo( theApp.m_pMainWnd->GetSafeHwnd(), OBJID_MENU, 0, &info );
|
||||||
int menuHeight = GetSystemMetrics(SM_CYMENU); // includes white line
|
int menuHeight = GetSystemMetrics(SM_CYMENU); // includes white line
|
||||||
if((info.rcBar.bottom - info.rcBar.top) > menuHeight)
|
if((info.rcBar.bottom - info.rcBar.top) > menuHeight) // check for double height menu
|
||||||
{
|
{
|
||||||
winSizeY += (info.rcBar.bottom - info.rcBar.top) - menuHeight + 1;
|
winSizeY += (info.rcBar.bottom - info.rcBar.top) - menuHeight + 1;
|
||||||
m_pMainWnd->SetWindowPos(
|
m_pMainWnd->SetWindowPos(
|
||||||
|
|
|
@ -112,7 +112,6 @@ class VBA : public CWinApp
|
||||||
CString screenMessageBuffer;
|
CString screenMessageBuffer;
|
||||||
DWORD screenMessageTime;
|
DWORD screenMessageTime;
|
||||||
u8 *delta[257*244*4];
|
u8 *delta[257*244*4];
|
||||||
bool menuToggle;
|
|
||||||
IDisplay *display;
|
IDisplay *display;
|
||||||
IMAGE_TYPE cartridgeType;
|
IMAGE_TYPE cartridgeType;
|
||||||
bool soundInitialized;
|
bool soundInitialized;
|
||||||
|
|
Loading…
Reference in New Issue