Skipping Lag Frames While Frame Advancing Has Been Implemented
This commit is contained in:
parent
28e621527c
commit
f6d558d4b4
|
@ -141,6 +141,7 @@
|
||||||
public int SaveSlot = 0; //currently selected savestate slot
|
public int SaveSlot = 0; //currently selected savestate slot
|
||||||
public bool AutoLoadLastSaveSlot = false;
|
public bool AutoLoadLastSaveSlot = false;
|
||||||
public bool WIN32_CONSOLE = true;
|
public bool WIN32_CONSOLE = true;
|
||||||
|
public bool SkipLagFrame = false;
|
||||||
|
|
||||||
// Run-Control settings
|
// Run-Control settings
|
||||||
public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress?
|
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
|
@ -1148,6 +1148,7 @@ namespace BizHawk.MultiClient
|
||||||
saveScreenshotWithSavestatesToolStripMenuItem.Checked = Global.Config.SaveScreenshotWithStates;
|
saveScreenshotWithSavestatesToolStripMenuItem.Checked = Global.Config.SaveScreenshotWithStates;
|
||||||
logWindowAsConsoleToolStripMenuItem.Checked = Global.Config.WIN32_CONSOLE;
|
logWindowAsConsoleToolStripMenuItem.Checked = Global.Config.WIN32_CONSOLE;
|
||||||
showMenuInFullScreenToolStripMenuItem.Checked = Global.Config.ShowMenuInFullscreen;
|
showMenuInFullScreenToolStripMenuItem.Checked = Global.Config.ShowMenuInFullscreen;
|
||||||
|
frameAdvanceSkipLagFramesToolStripMenuItem.Checked = Global.Config.SkipLagFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainForm_Load(object sender, EventArgs e)
|
private void MainForm_Load(object sender, EventArgs e)
|
||||||
|
|
|
@ -1562,6 +1562,11 @@ namespace BizHawk.MultiClient
|
||||||
double frameAdvanceTimestampDelta = (now - FrameAdvanceTimestamp).TotalMilliseconds;
|
double frameAdvanceTimestampDelta = (now - FrameAdvanceTimestamp).TotalMilliseconds;
|
||||||
bool frameProgressTimeElapsed = Global.Config.FrameProgressDelayMs < frameAdvanceTimestampDelta;
|
bool frameProgressTimeElapsed = Global.Config.FrameProgressDelayMs < frameAdvanceTimestampDelta;
|
||||||
|
|
||||||
|
if (Global.Emulator.IsLagFrame && frameProgressTimeElapsed && Global.Config.SkipLagFrame)
|
||||||
|
{
|
||||||
|
Global.Emulator.FrameAdvance(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (Global.ClientControls["Frame Advance"] || PressFrameAdvance)
|
if (Global.ClientControls["Frame Advance"] || PressFrameAdvance)
|
||||||
{
|
{
|
||||||
//handle the initial trigger of a frame advance
|
//handle the initial trigger of a frame advance
|
||||||
|
@ -1593,11 +1598,11 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
FrameAdvanceTimestamp = DateTime.MinValue;
|
FrameAdvanceTimestamp = DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EmulatorPaused)
|
if (!EmulatorPaused)
|
||||||
{
|
{
|
||||||
runFrame = true;
|
runFrame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Global.Config.RewindEnabled && Global.ClientControls["Rewind"] || PressRewind)
|
if (Global.Config.RewindEnabled && Global.ClientControls["Rewind"] || PressRewind)
|
||||||
{
|
{
|
||||||
|
@ -2704,5 +2709,10 @@ namespace BizHawk.MultiClient
|
||||||
return;
|
return;
|
||||||
makeAnimatedGif(sfd.FileName);
|
makeAnimatedGif(sfd.FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void frameAdvanceSkipLagFramesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Global.Config.SkipLagFrame ^= true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue