FrameBase: some changes to ease implementations (PR #910)

. simplify the interface FrameBase to make it easier to implement it for different cases (remove HDC and make parameters more explicit)
. remove functions which are only called on a Win32Frame (in which case a cast is guaranteed to succeed)
. otherwise there is the risk that every FrameBase implementation wants to add its own variants.
. FrameBase::FrameRefreshStatus() simplify implementation: pass all flags explicitly
This commit is contained in:
Andrea
2021-01-10 16:33:06 +00:00
committed by GitHub
parent 159cde7d64
commit 6cffb30330
16 changed files with 292 additions and 239 deletions
+21
View File
@@ -22,6 +22,20 @@ Win32Frame::Win32Frame()
g_hLogoBitmap = (HBITMAP)0;
g_hDeviceBitmap = (HBITMAP)0;
g_hDeviceDC = (HDC)0;
g_bAltEnter_ToggleFullScreen = false;
g_bIsFullScreen = false;
g_bShowingCursor = true;
g_bLastCursorInAppleViewport = false;
g_uCount100msec = 0;
g_TimerIDEvent_100msec = 0;
g_bUsingCursor = FALSE;
g_bAppActive = false;
g_bFrameActive = false;
g_windowMinimized = false;
g_bFullScreen_ShowSubunitStatus = true;
g_win_fullscreen_scale = 1;
g_win_fullscreen_offsetx = 0;
g_win_fullscreen_offsety = 0;
}
void Win32Frame::videoCreateDIBSection(Video & video)
@@ -499,3 +513,10 @@ void Win32Frame::DDUninit(void)
}
#undef SAFE_RELEASE
Win32Frame& Win32Frame::GetWin32Frame()
{
FrameBase& frameBase = GetFrame();
Win32Frame& win32Frame = dynamic_cast<Win32Frame&>(frameBase);
return win32Frame;
}