more FCEUI_Emulate code clean up

This commit is contained in:
adelikat 2008-12-05 04:23:48 +00:00
parent b199505bcb
commit e534c03691
1 changed files with 9 additions and 11 deletions

View File

@ -545,15 +545,12 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
JustFrameAdvanced = false;
if(frameAdvanceRequested) {
if(frameAdvanceDelay==0) {
if (frameAdvanceRequested)
{
if (frameAdvanceDelay==0 || frameAdvanceDelay>=10)
EmulationPaused = 3;
if (frameAdvanceDelay==0 || frameAdvanceDelay < 10)
frameAdvanceDelay++;
} else {
if(frameAdvanceDelay>=10) {
EmulationPaused = 3;
} else frameAdvanceDelay++;
}
}
if(EmulationPaused&2)
@ -572,9 +569,10 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
AutoFire();
if(!EnableAutosave) UpdateAutosave();
#ifdef _S9XLUA_H
#ifdef _S9XLUA_H
FCEU_LuaFrameBoundary();
#endif
#endif
FCEU_UpdateInput();
lagFlag = 1;
if(geniestage!=1) FCEU_ApplyPeriodicCheats();
@ -586,13 +584,12 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
UpdateCheatList();
UpdateTextHooker();
RamChange();
// FCEUI_AviVideoUpdate(XBuf);
//FCEUI_AviVideoUpdate(XBuf);
#endif
timestampbase += timestamp;
timestamp = 0;
*pXBuf=skip?0:XBuf;
*SoundBuf=WaveFinal;
*SoundBufSize=ssize;
@ -610,6 +607,7 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
}
currMovieData.TryDumpIncremental();
if (lagFlag)
{
lagCounter++;