Added Name property to Bk2Movie, fixed off-by-one in greenzone truncation, TAStudio displays name of movie in dialog title.
This commit is contained in:
parent
885757c17d
commit
17489f6175
|
@ -29,7 +29,20 @@ namespace BizHawk.Client.Common
|
|||
Header[HeaderKeys.MOVIEVERSION] = "BizHawk v2.0.0";
|
||||
}
|
||||
|
||||
public string Filename { get; set; }
|
||||
private string _filename;
|
||||
|
||||
public string Filename
|
||||
{
|
||||
get { return _filename; }
|
||||
set
|
||||
{
|
||||
_filename = value;
|
||||
int index = Filename.LastIndexOf("\\");
|
||||
Name = Filename.Substring(index + 1, Filename.Length - index - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public virtual string PreferredExtension { get { return Extension; } }
|
||||
public const string Extension = "bk2";
|
||||
|
|
|
@ -35,10 +35,10 @@ namespace BizHawk.Client.Common
|
|||
|
||||
if (frame < LagLog.Count)
|
||||
{
|
||||
LagLog.RemoveRange(frame, LagLog.Count - frame - 1);
|
||||
LagLog.RemoveRange(frame, LagLog.Count - frame);
|
||||
}
|
||||
|
||||
StateManager.Invalidate(frame + 1);
|
||||
StateManager.Invalidate(frame);
|
||||
|
||||
if (frame < _log.Count - 1)
|
||||
{
|
||||
|
|
|
@ -141,6 +141,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
WantsToControlStopMovie = false;
|
||||
GlobalWin.MainForm.StartNewMovie(_currentTasMovie, record: true);
|
||||
WantsToControlStopMovie = true;
|
||||
Text = "TAStudio - " + _currentTasMovie.Name;
|
||||
RefreshDialog();
|
||||
}
|
||||
}
|
||||
|
@ -165,6 +166,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
WantsToControlStopMovie = true;
|
||||
_currentTasMovie = Global.MovieSession.Movie as TasMovie;
|
||||
Global.Config.RecentTas.Add(path);
|
||||
Text = "TAStudio - " + _currentTasMovie.Name;
|
||||
RefreshDialog();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue