attempt to fix frame advance

This commit is contained in:
punkrockguy318 2008-08-14 15:58:16 +00:00
parent 627265e85f
commit 4900b4afbd
1 changed files with 20 additions and 10 deletions

View File

@ -526,14 +526,19 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
JustFrameAdvanced = false; JustFrameAdvanced = false;
if(frameAdvanceRequested) { if(frameAdvanceRequested)
if(frameAdvanceDelay==0) { {
if(frameAdvanceDelay==0)
{
EmulationPaused = 3; EmulationPaused = 3;
frameAdvanceDelay++; frameAdvanceDelay++;
} else { }
if(frameAdvanceDelay>=10) { else
{
if(frameAdvanceDelay>=10)
EmulationPaused = 3; EmulationPaused = 3;
} else frameAdvanceDelay++; //else
// frameAdvanceDelay++;
} }
} }
@ -588,6 +593,7 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
*SoundBufSize=0; // keep sound muted *SoundBufSize=0; // keep sound muted
#endif #endif
JustFrameAdvanced = true; JustFrameAdvanced = true;
frameAdvanceRequested = false;
} }
} }
} }
@ -601,8 +607,11 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
*SoundBufSize=0; // keep sound muted *SoundBufSize=0; // keep sound muted
#endif #endif
JustFrameAdvanced = true; JustFrameAdvanced = true;
frameAdvanceRequested = false;
} }
} //I apologize to anyone who comes in and tries to fgiure this if branching out } //I apologize to anyone who comes in and tries to fgiure this if branching out
if (JustFrameAdvanced)
frameAdvanceRequested = false;
currMovieData.TryDumpIncremental(); currMovieData.TryDumpIncremental();
if (lagFlag) if (lagFlag)
{ {
@ -611,6 +620,7 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
} }
else justLagged = false; else justLagged = false;
} }
void FCEUI_CloseGame(void) void FCEUI_CloseGame(void)