TasStateManager - capture every other frame for now
This commit is contained in:
parent
e65e9d8a22
commit
bbc84471d8
|
@ -65,8 +65,21 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Requests that the current emulator state be captured
|
/// Requests that the current emulator state be captured
|
||||||
|
/// Unless force is true, the state may or may not be captured depending on the logic employed by "greenzone" management
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Capture()
|
public void Capture(bool force = false)
|
||||||
|
{
|
||||||
|
bool shouldCapture = false;
|
||||||
|
if (force)
|
||||||
|
{
|
||||||
|
shouldCapture = force;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
shouldCapture = Global.Emulator.Frame % 2 > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shouldCapture)
|
||||||
{
|
{
|
||||||
var frame = Global.Emulator.Frame;
|
var frame = Global.Emulator.Frame;
|
||||||
var state = (byte[])Global.Emulator.SaveStateBinary().Clone();
|
var state = (byte[])Global.Emulator.SaveStateBinary().Clone();
|
||||||
|
@ -87,6 +100,7 @@ namespace BizHawk.Client.Common
|
||||||
Used += state.Length;
|
Used += state.Length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool HasState(int frame)
|
public bool HasState(int frame)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue