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,26 +601,19 @@ 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) {
|
||||||
|
if(fullScreenStretch) {
|
||||||
|
dest.top = 0;
|
||||||
|
dest.left = 0;
|
||||||
|
dest.right = fsWidth;
|
||||||
|
dest.bottom = fsHeight;
|
||||||
|
} else {
|
||||||
int top = (fsHeight - surfaceSizeY) / 2;
|
int top = (fsHeight - surfaceSizeY) / 2;
|
||||||
int left = (fsWidth - surfaceSizeX) / 2;
|
int left = (fsWidth - surfaceSizeX) / 2;
|
||||||
dest.top += top;
|
dest.top += top;
|
||||||
dest.bottom += top;
|
dest.bottom += top;
|
||||||
dest.left += left;
|
dest.left += left;
|
||||||
dest.right += left;
|
dest.right += left;
|
||||||
if(fullScreenStretch) {
|
|
||||||
dest.top = 0+menuSkip;
|
|
||||||
dest.left = 0;
|
|
||||||
dest.right = fsWidth;
|
|
||||||
dest.bottom = fsHeight;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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