Fix for flickery/bad video updates when MODE_RUNNING and full-speed (broken in previous 09fa6cc)

This commit is contained in:
tomcw 2016-09-17 21:26:45 +01:00
parent 41b2547acb
commit f559deddc3

View File

@ -1168,9 +1168,12 @@ void VideoRefreshScreen ( int bVideoModeFlags, UINT uDelayRefresh /* =0 */ )
DebugRefresh(0); DebugRefresh(0);
#endif #endif
if (g_nAppMode == MODE_DEBUG || g_nAppMode == MODE_PAUSED) if (bVideoModeFlags || g_nAppMode == MODE_PAUSED)
{ {
if (g_nAppMode == MODE_DEBUG) // bVideoModeFlags set if:
// . MODE_DEBUG : always
// . MODE_RUNNING : called from VideoRedrawScreen(), eg. during full-speed
if (bVideoModeFlags)
NTSC_SetVideoMode( bVideoModeFlags ); NTSC_SetVideoMode( bVideoModeFlags );
NTSC_VideoUpdateCycles( VIDEO_SCANNER_6502_CYCLES ); NTSC_VideoUpdateCycles( VIDEO_SCANNER_6502_CYCLES );
} }