Slight tweak to movie frame property
This commit is contained in:
parent
4a0a9e4b05
commit
cd03d2fe99
|
@ -345,9 +345,15 @@ namespace BizHawk.MultiClient
|
|||
StringBuilder s = new StringBuilder();
|
||||
s.Append(Global.Emulator.Frame);
|
||||
s.Append('/');
|
||||
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||
{
|
||||
s.Append(Global.MovieSession.Movie.Frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
s.Append("infinity");
|
||||
}
|
||||
s.Append(" (Finished)");
|
||||
//return Global.Emulator.Frame.ToString() + "/" + Global.MovieSession.Movie.Frames.ToString() + " (Finished)";
|
||||
return s.ToString();
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsPlaying)
|
||||
|
@ -355,7 +361,14 @@ namespace BizHawk.MultiClient
|
|||
StringBuilder s = new StringBuilder();
|
||||
s.Append(Global.Emulator.Frame);
|
||||
s.Append('/');
|
||||
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||
{
|
||||
s.Append(Global.MovieSession.Movie.Frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
s.Append("infinity");
|
||||
}
|
||||
return s.ToString();
|
||||
}
|
||||
else if (Global.MovieSession.Movie.IsRecording)
|
||||
|
|
|
@ -2016,7 +2016,14 @@ namespace BizHawk.MultiClient
|
|||
|
||||
public int movie_length()
|
||||
{
|
||||
return Global.MovieSession.Movie.Frames;
|
||||
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||
{
|
||||
return Global.MovieSession.Movie.Frames.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public string movie_filename()
|
||||
|
|
|
@ -244,7 +244,7 @@ namespace BizHawk.MultiClient
|
|||
// if user is dumping and didnt supply dump length, make it as long as the loaded movie
|
||||
if (autoDumpLength == 0)
|
||||
{
|
||||
autoDumpLength = m.Frames;
|
||||
autoDumpLength = m.RawFrames;
|
||||
}
|
||||
StartNewMovie(m, false);
|
||||
Global.Config.RecentMovies.Add(cmdMovie);
|
||||
|
|
|
@ -91,7 +91,22 @@ namespace BizHawk.MultiClient
|
|||
get { return Header.GetHeaderLine(MovieHeader.GAMENAME); }
|
||||
}
|
||||
|
||||
public int Frames
|
||||
public int RawFrames
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Loaded)
|
||||
{
|
||||
return Log.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
return preload_framecount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int? Frames
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -99,7 +114,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Loop)
|
||||
{
|
||||
return 999999; //TODO: rethink this, maybe return a nullable int, and on the client side check for null and act accordingly
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void DisplayList()
|
||||
{
|
||||
TASView.ItemCount = Global.MovieSession.Movie.Frames;
|
||||
TASView.ItemCount = Global.MovieSession.Movie.RawFrames;
|
||||
if (Global.MovieSession.Movie.Frames == Global.Emulator.Frame && Global.MovieSession.Movie.StateLastIndex == Global.Emulator.Frame - 1)
|
||||
{
|
||||
//If we're at the end of the movie add one to show the cursor as a blank frame
|
||||
|
|
Loading…
Reference in New Issue