simplify naming of Rewinder api
This commit is contained in:
parent
ef9bb3208d
commit
10e5df99f1
src
|
@ -11,8 +11,8 @@ namespace BizHawk.Client.Common
|
|||
long Size { get; }
|
||||
int RewindFrequency { get; }
|
||||
|
||||
bool RewindActive { get; }
|
||||
bool SuspendRewind { get; set; }
|
||||
bool Active { get; }
|
||||
bool Suspend { get; set; }
|
||||
|
||||
void Capture(int frame);
|
||||
bool Rewind(int frames);
|
||||
|
@ -33,11 +33,11 @@ namespace BizHawk.Client.Common
|
|||
private bool _lastRewindLoadedState;
|
||||
private byte[] _deltaBuffer = new byte[0];
|
||||
|
||||
public bool RewindActive => RewindEnabled && !SuspendRewind;
|
||||
public bool Active => RewindEnabled && !Suspend;
|
||||
|
||||
private bool RewindEnabled { get; }
|
||||
|
||||
public bool SuspendRewind { get; set; }
|
||||
public bool Suspend { get; set; }
|
||||
|
||||
public float FullnessRatio => _rewindBuffer?.FullnessRatio ?? 0;
|
||||
|
||||
|
@ -71,7 +71,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
_rewindDeltaEnable = settings.UseDelta;
|
||||
|
||||
if (RewindActive)
|
||||
if (Active)
|
||||
{
|
||||
var capacity = settings.BufferSize * 1024L * 1024L;
|
||||
_rewindBuffer = new StreamBlobDatabase(settings.OnDisk, capacity, BufferManage);
|
||||
|
@ -122,7 +122,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public void Capture(int frame)
|
||||
{
|
||||
if (!RewindActive)
|
||||
if (!Active)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public bool Rewind(int frames)
|
||||
{
|
||||
if (!RewindActive || _rewindThread == null)
|
||||
if (!Active || _rewindThread == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2099,7 +2099,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
// skips outputting the audio. There's also a third way which is when no throttle
|
||||
// method is selected, but the clock throttle determines that by itself and
|
||||
// everything appears normal here.
|
||||
var rewind = Rewinder?.RewindActive == true && (InputManager.ClientControls["Rewind"] || PressRewind);
|
||||
var rewind = Rewinder?.Active == true && (InputManager.ClientControls["Rewind"] || PressRewind);
|
||||
var fastForward = InputManager.ClientControls["Fast Forward"] || FastForward;
|
||||
var turbo = IsTurboing;
|
||||
|
||||
|
@ -4370,7 +4370,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Master.CaptureRewind();
|
||||
}
|
||||
else if (!suppressCaptureRewind && Rewinder?.RewindActive == true)
|
||||
else if (!suppressCaptureRewind && Rewinder?.Active == true)
|
||||
{
|
||||
Rewinder.Capture(Emulator.Frame);
|
||||
}
|
||||
|
@ -4432,7 +4432,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return isRewinding;
|
||||
}
|
||||
|
||||
if (Rewinder?.RewindActive == true && (InputManager.ClientControls["Rewind"] || PressRewind))
|
||||
if (Rewinder?.Active == true && (InputManager.ClientControls["Rewind"] || PressRewind))
|
||||
{
|
||||
if (EmulatorPaused)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void RewindConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (_mainForm.Rewinder?.RewindActive == true)
|
||||
if (_mainForm.Rewinder?.Active == true)
|
||||
{
|
||||
FullnessLabel.Text = $"{_mainForm.Rewinder.FullnessRatio * 100:0.00}%";
|
||||
RewindFramesUsedLabel.Text = _mainForm.Rewinder.Count.ToString();
|
||||
|
|
Loading…
Reference in New Issue