check if ITasMovie not TasMovie, still not great that it needs to check types but better
This commit is contained in:
parent
5e4983c93f
commit
705af68f65
|
@ -24,7 +24,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (movie is TasMovie tasMovie)
|
||||
if (movie is ITasMovie tasMovie)
|
||||
{
|
||||
_slots[i] = i < tasMovie.Branches.Count;
|
||||
}
|
||||
|
@ -67,10 +67,10 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public void ToggleRedo(IMovie movie, int slot)
|
||||
{
|
||||
if (0.RangeTo(9).Contains(slot) && !(movie is TasMovie)) _redo[slot] ^= true;
|
||||
if (0.RangeTo(9).Contains(slot) && !(movie is ITasMovie)) _redo[slot] ^= true;
|
||||
}
|
||||
|
||||
public bool IsRedo(IMovie movie, int slot) => 0.RangeTo(9).Contains(slot) && !(movie is TasMovie) && _redo[slot];
|
||||
public bool IsRedo(IMovie movie, int slot) => 0.RangeTo(9).Contains(slot) && !(movie is ITasMovie) && _redo[slot];
|
||||
|
||||
public void SwapBackupSavestate(IMovie movie, string path, int currentSlot)
|
||||
{
|
||||
|
|
|
@ -85,12 +85,12 @@ namespace BizHawk.Client.Common
|
|||
});
|
||||
}
|
||||
|
||||
if (Global.MovieSession.Movie.IsActive() && Global.MovieSession.Movie is TasMovie)
|
||||
if (Global.MovieSession.Movie.IsActive() && Global.MovieSession.Movie is ITasMovie)
|
||||
{
|
||||
bs.PutLump(BinaryStateLump.LagLog,
|
||||
delegate(TextWriter tw)
|
||||
{
|
||||
((TasMovie)Global.MovieSession.Movie).LagLog.Save(tw);
|
||||
((ITasMovie)Global.MovieSession.Movie).LagLog.Save(tw);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -152,11 +152,11 @@ namespace BizHawk.Client.Common
|
|||
Global.UserBag = (Dictionary<string, object>)ConfigService.LoadWithType(userData);
|
||||
}
|
||||
|
||||
if (Global.MovieSession.Movie.IsActive() && Global.MovieSession.Movie is TasMovie)
|
||||
if (Global.MovieSession.Movie.IsActive() && Global.MovieSession.Movie is ITasMovie)
|
||||
{
|
||||
bl.GetLump(BinaryStateLump.LagLog, false, delegate(TextReader tr)
|
||||
{
|
||||
((TasMovie)Global.MovieSession.Movie).LagLog.Load(tr);
|
||||
((ITasMovie)Global.MovieSession.Movie).LagLog.Load(tr);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue