mirror of
https://github.com/libretro/FBNeo.git
synced 2024-11-23 17:09:43 +00:00
Port over win32 runahead fixes to SDL (#1770)
* Port over win32 runahead fixes to SDL * Fix formatting
This commit is contained in:
parent
c46b16f225
commit
acea063357
@ -160,23 +160,40 @@ static int RunFrame(int bDraw, int bPause)
|
||||
{
|
||||
nFramesRendered++;
|
||||
|
||||
if (!bRunAhead || bAppDoFast) { // Run-Ahead feature -dink aug 02, 2021
|
||||
if (!bRunAhead || (BurnDrvGetFlags() & BDF_RUNAHEAD_DISABLED) || bAppDoFast) { // Run-Ahead feature -dink aug 02, 2021
|
||||
if (VidFrame()) { // Do one frame w/o RunAhead or if FFWD is pressed.
|
||||
// VidFrame() failed, but we must run a driver frame because we have
|
||||
// a clocked input. Possibly from recording or netplay(!)
|
||||
// Note: VidFrame() calls BurnDrvFrame() on success.
|
||||
pBurnDraw = NULL; // Make sure no image is drawn
|
||||
BurnDrvFrame();
|
||||
|
||||
AudBlankSound();
|
||||
}
|
||||
} else {
|
||||
pBurnDraw = NULL; // Do one frame w/RunAhead
|
||||
BurnDrvFrame();
|
||||
StateRunAheadSave();
|
||||
pBurnSoundOut = NULL;
|
||||
VidFrame();
|
||||
StateRunAheadLoad();
|
||||
pBurnDraw = (BurnDrvGetFlags() & BDF_RUNAHEAD_DRAWSYNC) ? pVidImage : NULL;
|
||||
BurnDrvFrame();
|
||||
StateRunAheadSave();
|
||||
INT16 *pBurnSoundOut_temp = pBurnSoundOut;
|
||||
pBurnSoundOut = NULL;
|
||||
nCurrentFrame++;
|
||||
bBurnRunAheadFrame = 1;
|
||||
|
||||
if (VidFrame()) {
|
||||
// VidFrame() failed, but we must run a driver frame because we have
|
||||
// an input. Possibly from recording or netplay(!)
|
||||
pBurnDraw = NULL; // Make sure no image is drawn, since video failed this time 'round.
|
||||
BurnDrvFrame();
|
||||
}
|
||||
|
||||
bBurnRunAheadFrame = 0;
|
||||
nCurrentFrame--;
|
||||
StateRunAheadLoad();
|
||||
pBurnSoundOut = pBurnSoundOut_temp; // restore pointer, for wav & avi writer
|
||||
}
|
||||
|
||||
VidPaint(0); // paint the screen (no need to validate)
|
||||
}
|
||||
else
|
||||
{ // frame skipping
|
||||
} else { // frame skipping
|
||||
pBurnDraw = NULL; // Make sure no image is drawn
|
||||
BurnDrvFrame();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user