TasStateManager - GetStateClosestToFrame() - state savestate anchored movies into account

This commit is contained in:
adelikat 2014-10-26 23:17:20 +00:00
parent ad7782df35
commit fa9971022b
1 changed files with 8 additions and 1 deletions

View File

@ -242,7 +242,14 @@ namespace BizHawk.Client.Common
public byte[] GetStateClosestToFrame(int frame)
{
return States.LastOrDefault(state => state.Key < frame).Value;
var s = States.LastOrDefault(state => state.Key < frame).Value;
if (s == null && _movie.StartsFromSavestate)
{
return _movie.BinarySavestate;
}
return s;
}
// Map: