Skipping Lag Frames While Frame Advancing Has Been Implemented

This commit is contained in:
Rolanmen1 2012-03-07 03:58:54 +00:00
parent 28e621527c
commit f6d558d4b4
4 changed files with 1948 additions and 1925 deletions

View File

@ -141,6 +141,7 @@
public int SaveSlot = 0; //currently selected savestate slot
public bool AutoLoadLastSaveSlot = false;
public bool WIN32_CONSOLE = true;
public bool SkipLagFrame = false;
// Run-Control settings
public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress?

File diff suppressed because it is too large Load Diff

View File

@ -1148,6 +1148,7 @@ namespace BizHawk.MultiClient
saveScreenshotWithSavestatesToolStripMenuItem.Checked = Global.Config.SaveScreenshotWithStates;
logWindowAsConsoleToolStripMenuItem.Checked = Global.Config.WIN32_CONSOLE;
showMenuInFullScreenToolStripMenuItem.Checked = Global.Config.ShowMenuInFullscreen;
frameAdvanceSkipLagFramesToolStripMenuItem.Checked = Global.Config.SkipLagFrame;
}
private void MainForm_Load(object sender, EventArgs e)

View File

@ -1562,6 +1562,11 @@ namespace BizHawk.MultiClient
double frameAdvanceTimestampDelta = (now - FrameAdvanceTimestamp).TotalMilliseconds;
bool frameProgressTimeElapsed = Global.Config.FrameProgressDelayMs < frameAdvanceTimestampDelta;
if (Global.Emulator.IsLagFrame && frameProgressTimeElapsed && Global.Config.SkipLagFrame)
{
Global.Emulator.FrameAdvance(true);
}
if (Global.ClientControls["Frame Advance"] || PressFrameAdvance)
{
//handle the initial trigger of a frame advance
@ -1593,11 +1598,11 @@ namespace BizHawk.MultiClient
}
FrameAdvanceTimestamp = DateTime.MinValue;
}
if (!EmulatorPaused)
{
runFrame = true;
}
if (!EmulatorPaused)
{
runFrame = true;
}
if (Global.Config.RewindEnabled && Global.ClientControls["Rewind"] || PressRewind)
{
@ -2704,5 +2709,10 @@ namespace BizHawk.MultiClient
return;
makeAnimatedGif(sfd.FileName);
}
private void frameAdvanceSkipLagFramesToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SkipLagFrame ^= true;
}
}
}