From 3c779a897b121b299f5401e896712a37a4eb6bd4 Mon Sep 17 00:00:00 2001
From: feos <feos-theos@yandex.ru>
Date: Wed, 27 Jan 2016 16:41:41 +0300
Subject: [PATCH] lua: emu.setislagged()

---
 BizHawk.Client.Common/lua/EmuLuaLibrary.Emu.cs | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Emu.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Emu.cs
index 6aa64e4dc9..8aa78ed661 100644
--- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Emu.cs
+++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Emu.cs
@@ -174,6 +174,22 @@ namespace BizHawk.Client.Common
 			}
 		}
 
+		[LuaMethodAttributes(
+			"setislagged",
+			"marks the current frame as a lag frame"
+		)]
+		public void SetIsLagged(bool value = true)
+		{
+			if (InputPollableCore != null)
+			{
+				InputPollableCore.IsLagFrame = value;
+			}
+			else
+			{
+				Log(string.Format("Can not set lag information, {0} does not implement IInputPollable", Emulator.Attributes().CoreName));
+			}
+		}
+
 		[LuaMethodAttributes(
 			"lagcount",
 			"Returns the current lag count"