remove more tastudio instances in movie class, TAStudio - re-hook up double click event

This commit is contained in:
adelikat 2012-08-18 00:04:12 +00:00
parent c9ddbd6d89
commit 514c3200d7
3 changed files with 16 additions and 16 deletions

View File

@ -81,9 +81,9 @@ namespace BizHawk.MultiClient
}
public void UpdateFileName(string filename)
{
this.Filename = filename;
}
{
this.Filename = filename;
}
public void StopMovie()
{
@ -94,7 +94,7 @@ namespace BizHawk.MultiClient
public void CaptureState()
{
if (true == TastudioOn)
if (TastudioOn == true)
{
byte[] state = Global.Emulator.SaveStateBinary();
Log.AddState(state);
@ -112,9 +112,7 @@ namespace BizHawk.MultiClient
{
if (frame <= Log.StateFirstIndex())
{
//Global.MainForm.LoadRom(Global.MainForm.CurrentlyOpenRom,false);
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.GetInitState())));
Global.MainForm.TAStudio1.UpdateValues();
if (true == Global.MainForm.EmulatorPaused && 0 != frame)
{
Global.MainForm.StopOnFrame = frame;
@ -130,10 +128,7 @@ namespace BizHawk.MultiClient
{
if (0 == frame)
{
//Global.MainForm.LoadRom(Global.MainForm.CurrentlyOpenRom, false);
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(Log.GetInitState())));
//Global.MainForm.StopOnFrame = frame;
Global.MainForm.TAStudio1.UpdateValues();
}
else
{
@ -179,7 +174,7 @@ namespace BizHawk.MultiClient
public void ClearSaveRAM()
{
string x = PathManager.SaveRamPath(Global.Game);
var file = new FileInfo(PathManager.SaveRamPath(Global.Game));
if (file.Exists) file.Delete();
}
@ -194,7 +189,7 @@ namespace BizHawk.MultiClient
WriteBackup();
MakeBackup = false;
}
if(truncate) Log.Clear();
if (truncate) Log.Clear();
}
public void StartPlayback()
@ -254,7 +249,7 @@ namespace BizHawk.MultiClient
public void InsertFrame(string record, int frame)
{
Log.AddFrameAt(record,frame);
Log.AddFrameAt(record, frame);
}
public void InsertBlankFrame(int frame)
@ -549,7 +544,7 @@ namespace BizHawk.MultiClient
}
}
public void SetRerecords(int value)
public void SetRerecords(int value)
{
Rerecords = value;
Header.SetHeaderLine(MovieHeader.RERECORDS, Rerecords.ToString());
@ -752,8 +747,8 @@ namespace BizHawk.MultiClient
//Future event error
MessageBox.Show("The savestate is from frame " + l.MovieLength().ToString() + " which is greater than the current movie length of " +
Log.MovieLength().ToString() + ".\nCan not load this savestate.", "Future event Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
reader.Close();
return false;
reader.Close();
return false;
}
for (int x = 0; x < stateFrame; x++)
{

View File

@ -628,6 +628,7 @@
this.TASView.View = System.Windows.Forms.View.Details;
this.TASView.SelectedIndexChanged += new System.EventHandler(this.TASView_SelectedIndexChanged);
this.TASView.Click += new System.EventHandler(this.TASView_Click);
this.TASView.DoubleClick += new System.EventHandler(this.TASView_DoubleClick);
this.TASView.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.TASView_MouseWheel);
//
// Frame

View File

@ -359,6 +359,7 @@ namespace BizHawk.MultiClient
private void RewindButton_Click(object sender, EventArgs e)
{
Global.MovieSession.Movie.RewindToFrame(Global.Emulator.Frame - 1);
UpdateValues();
}
private void PauseButton_Click(object sender, EventArgs e)
@ -532,12 +533,13 @@ namespace BizHawk.MultiClient
private void TASView_SelectedIndexChanged(object sender, EventArgs e)
{
UpdateSlicerDisplay();
}
private void TASView_DoubleClick(object sender, EventArgs e)
{
Global.MovieSession.Movie.RewindToFrame(TASView.selectedItem);
UpdateValues();
}
private void Insert_Click(object sender, EventArgs e)
@ -583,6 +585,8 @@ namespace BizHawk.MultiClient
{
Global.MainForm.PressFrameAdvance = true;
}
UpdateValues();
}
}