For full-speed: update every 16ms of real-time (close #351)

This commit is contained in:
tomcw
2016-09-22 22:34:16 +01:00
parent 626965109a
commit 30160583cb
3 changed files with 15 additions and 4 deletions
+11 -2
View File
@@ -1052,16 +1052,25 @@ void VideoDisplayLogo ()
// . 10s only update if HIRES changes (17s for Debug build)
// . ~9s no update during full-speed (but IBIZA.DSK doesn't show anything!)
void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInvalidate /*=false*/)
void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=false*/)
{
static DWORD dwFullSpeedStartTime = 0;
static bool bValid = false;
if (bInvalidate)
if (bInit)
{
// Just entered full-speed mode
bValid = false;
dwFullSpeedStartTime = GetTickCount();
return;
}
DWORD dwFullSpeedDuration = GetTickCount() - dwFullSpeedStartTime;
if (dwFullSpeedDuration <= 16) // Only update after every realtime ~17ms of *continuous* full-speed
return;
dwFullSpeedStartTime += dwFullSpeedDuration;
//
static BYTE text_main[1024*2] = {0}; // page1 & 2