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
+5 -2
View File
@@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../Interface.h"
#include "../CPU.h"
#include "../Windows/WinFrame.h"
#include "../Windows/Win32Frame.h"
#include "../LanguageCard.h"
#include "../Memory.h"
#include "../Mockingboard.h"
@@ -671,8 +672,10 @@ void StretchBltMemToFrameDC(void)
int nViewportCX, nViewportCY;
GetViewportCXCY(nViewportCX, nViewportCY);
int xdest = IsFullScreen() ? GetFullScreenOffsetX() : 0;
int ydest = IsFullScreen() ? GetFullScreenOffsetY() : 0;
Win32Frame& win32Frame = Win32Frame::GetWin32Frame();
int xdest = win32Frame.IsFullScreen() ? win32Frame.GetFullScreenOffsetX() : 0;
int ydest = win32Frame.IsFullScreen() ? win32Frame.GetFullScreenOffsetY() : 0;
int wdest = nViewportCX;
int hdest = nViewportCY;