mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
For full-speed: update every 16ms of real-time (close #351)
This commit is contained in:
+11
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user