1. Fixed an issue that prevented going into the movie finished state properly.
2. Relegated a memory leak to tastudio.
This commit is contained in:
parent
2dd91c4079
commit
c7db5fd543
|
@ -32,7 +32,7 @@ namespace BizHawk.MultiClient
|
|||
public bool PressRewind = false;
|
||||
public bool FastForward = false;
|
||||
public bool TurboFastForward = false;
|
||||
public bool StopOnEnd = false;
|
||||
public bool StopOnEnd = true;
|
||||
public bool UpdateFrame = false;
|
||||
|
||||
//avi/wav state
|
||||
|
@ -1838,8 +1838,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (!suppressCaptureRewind && Global.Config.RewindEnabled) CaptureRewindState();
|
||||
|
||||
|
||||
//Global.MovieSession.Movie.CaptureState();
|
||||
Global.MovieSession.Movie.CaptureState();
|
||||
|
||||
if (!runloop_frameadvance) genSound = true;
|
||||
else if (!Global.Config.MuteFrameAdvance)
|
||||
|
@ -1875,15 +1874,18 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (Global.MovieSession.Movie.Mode == MOVIEMODE.PLAY)
|
||||
{
|
||||
if (Global.MovieSession.Movie.Length() == Global.Emulator.Frame && true == StopOnEnd)
|
||||
if (Global.MovieSession.Movie.Length() == Global.Emulator.Frame+1 && true == StopOnEnd)
|
||||
{
|
||||
StopOnEnd = false;
|
||||
if (true == Global.MovieSession.Movie.TastudioOn)
|
||||
{
|
||||
StopOnEnd = false;
|
||||
}
|
||||
Global.MovieSession.Movie.SetMovieFinished();
|
||||
}
|
||||
}
|
||||
if (Global.MovieSession.Movie.Mode == MOVIEMODE.FINISHED)
|
||||
{
|
||||
if (Global.MovieSession.Movie.Length() > Global.Emulator.Frame)
|
||||
if (Global.MovieSession.Movie.Length() > Global.Emulator.Frame+1)
|
||||
{
|
||||
Global.MovieSession.Movie.StartPlayback();
|
||||
//Global.MovieSession.MovieControllerAdapter.SetControllersAsMnemonic(Global.MovieSession.Movie.GetInputFrame(Global.Emulator.Frame));
|
||||
|
|
|
@ -16,6 +16,9 @@ namespace BizHawk.MultiClient
|
|||
public SubtitleList Subtitles = new SubtitleList();
|
||||
public bool MakeBackup = true; //make backup before altering movie
|
||||
|
||||
//Remove this once the memory mangement issues with save states for tastudio has been solved.
|
||||
public bool TastudioOn = false;
|
||||
|
||||
public bool IsText { get; private set; }
|
||||
public string Filename { get; private set; }
|
||||
public MOVIEMODE Mode { get; set; }
|
||||
|
@ -91,8 +94,16 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public void CaptureState()
|
||||
{
|
||||
byte[] state = Global.Emulator.SaveStateBinary();
|
||||
Log.AddState(state);
|
||||
if (true == TastudioOn)
|
||||
{
|
||||
byte[] state = Global.Emulator.SaveStateBinary();
|
||||
Log.AddState(state);
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearStates()
|
||||
{
|
||||
Log.ClearStates();
|
||||
}
|
||||
|
||||
public void RewindToFrame(int frame)
|
||||
|
|
|
@ -106,6 +106,12 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public void ClearStates()
|
||||
{
|
||||
StateList.Clear();
|
||||
StateLastValidIndex = -1;
|
||||
}
|
||||
|
||||
public void Truncate(int frame)
|
||||
{
|
||||
if (frame >= 0 && frame < Length())
|
||||
|
|
|
@ -17,7 +17,14 @@
|
|||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
|
||||
//Todo remove once save state log memory issues are fixed
|
||||
Global.MovieSession.Movie.TastudioOn = false;
|
||||
Global.MovieSession.Movie.ClearStates();
|
||||
|
||||
Global.MainForm.StopOnEnd = true;
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
|
|
@ -146,6 +146,10 @@ namespace BizHawk.MultiClient
|
|||
Engaged = true;
|
||||
Global.OSD.AddMessage("TAStudio engaged");
|
||||
|
||||
Global.MovieSession.Movie.TastudioOn = true;
|
||||
|
||||
Global.MainForm.StopOnEnd = false;
|
||||
|
||||
LoadConfigSettings();
|
||||
ReadOnlyCheckBox.Checked = Global.MainForm.ReadOnly;
|
||||
DisplayList();
|
||||
|
@ -351,7 +355,15 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void FastForwardToEnd_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.MainForm.StopOnEnd ^= true;
|
||||
if (true == this.FastFowardToEnd.Checked)
|
||||
{
|
||||
Global.MainForm.StopOnEnd = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.MainForm.StopOnEnd = true;
|
||||
}
|
||||
|
||||
this.FastFowardToEnd.Checked ^= true;
|
||||
Global.MainForm.FastForward = this.FastFowardToEnd.Checked;
|
||||
if (true == this.FastFowardToEnd.Checked)
|
||||
|
|
Loading…
Reference in New Issue