Video & FrameBase: better split (PR #908)

* Video / FrameBase: move arch specific code to FrameBase.
* Video::Initialize & SetFrameBuffer.
Ensure initialization and SetBuffer can only happen in the right order.
* Video: move virtual functions to FrameBase.
With these changes all the virtual functions are in FrameBase and Video gets closer to be (only) the Apple ][ Video device.
* Move a few more functions from Video to FrameBase (snapshot related)
Now, the inclusion is one way with Video *not* including FrameBase.
* FrameBase::VideoRefreshScreen move Video related code to Video.
And only leave management to FrameBase.
This commit is contained in:
Andrea
2021-01-03 16:21:24 +00:00
committed by GitHub
parent 0139878dd7
commit 159cde7d64
20 changed files with 751 additions and 781 deletions
+4 -5
View File
@@ -44,7 +44,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../Memory.h"
#include "../NTSC.h"
#include "../SoundCore.h" // SoundCore_SetFade()
#include "../Windows/WinVideo.h"
#include "../Windows/WinFrame.h"
// #define DEBUG_COMMAND_HELP 1
@@ -754,7 +753,7 @@ Update_t CmdBenchmarkStop (int nArgs)
DebugEnd();
GetFrame().FrameRefreshStatus(DRAW_TITLE);
GetVideo().VideoRedrawScreen();
GetFrame().VideoRedrawScreen();
DWORD currtime = GetTickCount();
while ((extbench = GetTickCount()) != currtime)
; // intentional busy-waiting
@@ -6896,7 +6895,7 @@ Update_t _ViewOutput( ViewVideoPage_t iPage, int bVideoModeFlags )
}
DebugVideoMode::Instance().Set(bVideoModeFlags);
GetVideo().VideoRefreshScreen( bVideoModeFlags, true );
GetFrame().VideoRefreshScreen( bVideoModeFlags, true );
return UPDATE_NOTHING; // intentional
}
@@ -7447,7 +7446,7 @@ Update_t CmdWindowViewData (int nArgs)
//===========================================================================
Update_t CmdWindowViewOutput (int nArgs)
{
GetVideo().VideoRedrawScreen();
GetFrame().VideoRedrawScreen();
DebugVideoMode::Instance().Set( GetVideo().GetVideoMode() );
@@ -9583,7 +9582,7 @@ void DebugDisplay( BOOL bInitDisasm/*=FALSE*/ )
{
uint32_t mode = 0;
DebugVideoMode::Instance().Get(&mode);
GetVideo().VideoRefreshScreen(mode, true);
GetFrame().VideoRefreshScreen(mode, true);
return;
}