Misc cleanups on movie code

This commit is contained in:
andres.delikat 2011-05-12 16:56:30 +00:00
parent 477999f99d
commit ced976a65d
4 changed files with 169 additions and 133 deletions

File diff suppressed because it is too large Load Diff

View File

@ -130,9 +130,21 @@ namespace BizHawk.MultiClient
DialogResult d = p.ShowDialog(); DialogResult d = p.ShowDialog();
} }
public void StopUserMovie()
{
if (UserMovie.GetMovieMode() == MOVIEMODE.RECORD)
UserMovie.StopMovie();
}
public void StopInputLog()
{
if (InputLog.GetMovieMode() == MOVIEMODE.RECORD)
InputLog.StopMovie();
}
private void stopMovieToolStripMenuItem_Click(object sender, EventArgs e) private void stopMovieToolStripMenuItem_Click(object sender, EventArgs e)
{ {
InputLog.StopMovie(); //TODO: stop user movie if it exists, and start InputLog logging, else do nothing StopUserMovie();
} }
private void playFromBeginningToolStripMenuItem_Click(object sender, EventArgs e) private void playFromBeginningToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -1669,5 +1669,19 @@ namespace BizHawk.MultiClient
{ {
Global.Config.DisplayInput ^= true; Global.Config.DisplayInput ^= true;
} }
private void movieToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
if (UserMovie.GetMovieMode() == MOVIEMODE.INACTIVE)
{
stopMovieToolStripMenuItem.Enabled = false;
playFromBeginningToolStripMenuItem.Enabled = false;
}
else
{
stopMovieToolStripMenuItem.Enabled = true;
playFromBeginningToolStripMenuItem.Enabled = true;
}
}
} }
} }

View File

@ -46,15 +46,16 @@ namespace BizHawk.MultiClient
public void StopMovie() public void StopMovie()
{ {
MovieMode = MOVIEMODE.INACTIVE; if (MovieMode == MOVIEMODE.RECORD)
WriteMovie(); WriteMovie();
MovieMode = MOVIEMODE.INACTIVE;
} }
public void StartNewRecording() public void StartNewRecording()
{ {
MovieMode = MOVIEMODE.RECORD; MovieMode = MOVIEMODE.RECORD;
Log.Clear(); Log.Clear();
Header = new MovieHeader("v1.0.0", MovieHeader.MovieVersion, Global.Emulator.SystemId, Global.Game.Name, ""); Header = new MovieHeader("BizHawk v1.0.0", MovieHeader.MovieVersion, Global.Emulator.SystemId, Global.Game.Name, "");
} }
public void StartPlayback() public void StartPlayback()