fix error in previous rewind-related commit. im thinking it might not have been such a great idea now...
This commit is contained in:
parent
892a3fbf76
commit
aa3f916e7b
|
@ -96,6 +96,12 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public void DoRewindSettings()
|
public void DoRewindSettings()
|
||||||
{
|
{
|
||||||
|
if (_rewindThread != null)
|
||||||
|
{
|
||||||
|
_rewindThread.Dispose();
|
||||||
|
_rewindThread = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (Global.Emulator.HasSavestates())
|
if (Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
// This is the first frame. Capture the state, and put it in LastState for future deltas to be compared against.
|
// This is the first frame. Capture the state, and put it in LastState for future deltas to be compared against.
|
||||||
|
@ -145,11 +151,6 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
_rewindBuffer = new StreamBlobDatabase(Global.Config.Rewind_OnDisk, capacity, BufferManage);
|
_rewindBuffer = new StreamBlobDatabase(Global.Config.Rewind_OnDisk, capacity, BufferManage);
|
||||||
|
|
||||||
if (_rewindThread != null)
|
|
||||||
{
|
|
||||||
_rewindThread.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_rewindThread = new RewindThreader(this, Global.Config.Rewind_IsThreaded);
|
_rewindThread = new RewindThreader(this, Global.Config.Rewind_IsThreaded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +158,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public void Rewind(int frames)
|
public void Rewind(int frames)
|
||||||
{
|
{
|
||||||
if (Global.Emulator.HasSavestates())
|
if (Global.Emulator.HasSavestates() && _rewindThread != null)
|
||||||
{
|
{
|
||||||
_rewindThread.Rewind(frames);
|
_rewindThread.Rewind(frames);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue