MultiHawk - fix up frame counter when a movie is active

This commit is contained in:
adelikat 2015-03-06 00:48:31 +00:00
parent aaa5704107
commit 415e3e3a14
2 changed files with 23 additions and 1 deletions

View File

@ -14,6 +14,11 @@ namespace BizHawk.Client.EmuHawk
{
partial class MainForm
{
public void StartNewMovie(string path, bool record)
{
StartNewMovie(MovieService.Get(Global.Config.RecentMovies.MostRecent), false);
}
public bool StartNewMovie(IMovie movie, bool record)
{
if (movie.IsActive)

View File

@ -1038,7 +1038,21 @@ namespace BizHawk.Client.MultiHawk
{
if (EmulatorWindows.Any())
{
FameStatusBarLabel.Text = EmulatorWindows.Master.Emulator.Frame.ToString();
string frame = EmulatorWindows.Master.Emulator.Frame.ToString();
if (Global.MovieSession.Movie.IsActive)
{
if (Global.MovieSession.Movie.IsFinished)
{
frame += string.Format(" / {0} (finished)", Global.MovieSession.Movie.FrameCount);
}
else if (Global.MovieSession.Movie.IsPlaying)
{
frame += string.Format(" / {0}", Global.MovieSession.Movie.FrameCount);
}
}
FameStatusBarLabel.Text = frame;
}
}
@ -1069,12 +1083,14 @@ namespace BizHawk.Client.MultiHawk
{
new RecordMovie().ShowDialog();
UpdateMainText();
UpdateAfterFrameChanged();
}
private void PlayMovieMenuItem_Click(object sender, EventArgs e)
{
new PlayMovie().ShowDialog();
UpdateMainText();
UpdateAfterFrameChanged();
}
private void StopMovieMenuItem_Click(object sender, EventArgs e)
@ -1082,6 +1098,7 @@ namespace BizHawk.Client.MultiHawk
Global.MovieSession.StopMovie(true);
SetMainformMovieInfo();
UpdateMainText();
UpdateAfterFrameChanged();
//UpdateStatusSlots(); // TODO
}