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();
|
StringBuilder s = new StringBuilder();
|
||||||
s.Append(Global.Emulator.Frame);
|
s.Append(Global.Emulator.Frame);
|
||||||
s.Append('/');
|
s.Append('/');
|
||||||
s.Append(Global.MovieSession.Movie.Frames);
|
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||||
|
{
|
||||||
|
s.Append(Global.MovieSession.Movie.Frames);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s.Append("infinity");
|
||||||
|
}
|
||||||
s.Append(" (Finished)");
|
s.Append(" (Finished)");
|
||||||
//return Global.Emulator.Frame.ToString() + "/" + Global.MovieSession.Movie.Frames.ToString() + " (Finished)";
|
|
||||||
return s.ToString();
|
return s.ToString();
|
||||||
}
|
}
|
||||||
else if (Global.MovieSession.Movie.IsPlaying)
|
else if (Global.MovieSession.Movie.IsPlaying)
|
||||||
|
@ -355,7 +361,14 @@ namespace BizHawk.MultiClient
|
||||||
StringBuilder s = new StringBuilder();
|
StringBuilder s = new StringBuilder();
|
||||||
s.Append(Global.Emulator.Frame);
|
s.Append(Global.Emulator.Frame);
|
||||||
s.Append('/');
|
s.Append('/');
|
||||||
s.Append(Global.MovieSession.Movie.Frames);
|
if (Global.MovieSession.Movie.Frames.HasValue)
|
||||||
|
{
|
||||||
|
s.Append(Global.MovieSession.Movie.Frames);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s.Append("infinity");
|
||||||
|
}
|
||||||
return s.ToString();
|
return s.ToString();
|
||||||
}
|
}
|
||||||
else if (Global.MovieSession.Movie.IsRecording)
|
else if (Global.MovieSession.Movie.IsRecording)
|
||||||
|
|
|
@ -2016,7 +2016,14 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
public int movie_length()
|
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()
|
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 user is dumping and didnt supply dump length, make it as long as the loaded movie
|
||||||
if (autoDumpLength == 0)
|
if (autoDumpLength == 0)
|
||||||
{
|
{
|
||||||
autoDumpLength = m.Frames;
|
autoDumpLength = m.RawFrames;
|
||||||
}
|
}
|
||||||
StartNewMovie(m, false);
|
StartNewMovie(m, false);
|
||||||
Global.Config.RecentMovies.Add(cmdMovie);
|
Global.Config.RecentMovies.Add(cmdMovie);
|
||||||
|
|
|
@ -91,7 +91,22 @@ namespace BizHawk.MultiClient
|
||||||
get { return Header.GetHeaderLine(MovieHeader.GAMENAME); }
|
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
|
get
|
||||||
{
|
{
|
||||||
|
@ -99,7 +114,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (Loop)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void DisplayList()
|
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 (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
|
//If we're at the end of the movie add one to show the cursor as a blank frame
|
||||||
|
|
Loading…
Reference in New Issue