tastudio/lua - implement tastudio.setlag()

This commit is contained in:
adelikat 2015-07-09 13:16:55 -04:00
parent 3541c9e975
commit 7ecf96772c
2 changed files with 17 additions and 0 deletions

View File

@ -469,6 +469,11 @@ namespace BizHawk.Client.Common
{
LagLog.InsertHistoryAt(frame, isLag);
}
public void SetLag(int frame, bool? value)
{
LagLog[frame] = value;
}
#endregion
}
}

View File

@ -110,6 +110,18 @@ namespace BizHawk.Client.EmuHawk
return null;
}
[LuaMethodAttributes(
"setlag",
"Sets the lag information for the given frame, if the frame does not exist in the lag log, it will be added. If the value is null, the lag information for that frame will be removed"
)]
public void SetLag(int frame, bool? value)
{
if (Engaged())
{
Tastudio.CurrentTasMovie.SetLag(frame, value);
}
}
[LuaMethodAttributes(
"hasstate",
"Returns whether or not the given frame has a savestate associated with it"