Lua - implement emu.enablerewind(), also add on screen message when rewind is toggled
This commit is contained in:
parent
fcac19aed9
commit
15371b3cd9
|
@ -291,6 +291,7 @@ namespace BizHawk.MultiClient
|
|||
"minimizeframeskip",
|
||||
"limitframerate",
|
||||
"displayvsync",
|
||||
"enablerewind"
|
||||
};
|
||||
|
||||
public static string[] MemoryFunctions = new string[]
|
||||
|
@ -898,6 +899,23 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
public void emu_enablerewind(object boolean)
|
||||
{
|
||||
string temp = boolean.ToString();
|
||||
if (!String.IsNullOrWhiteSpace(temp))
|
||||
{
|
||||
if (temp == "0" || temp.ToLower() == "false")
|
||||
{
|
||||
Global.Config.RewindEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.Config.RewindEnabled = true;
|
||||
}
|
||||
Global.MainForm.RewindMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public void emu_frameskip(object num_frames)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -476,6 +476,19 @@ namespace BizHawk.MultiClient
|
|||
private void enableRewindToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RewindEnabled ^= true;
|
||||
RewindMessage();
|
||||
}
|
||||
|
||||
public void RewindMessage()
|
||||
{
|
||||
if (Global.Config.RewindEnabled)
|
||||
{
|
||||
Global.OSD.AddMessage("Rewind enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
Global.OSD.AddMessage("Rewind disabled");
|
||||
}
|
||||
}
|
||||
|
||||
private void hexEditorToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue