add an option to run lua scripts while turboing instead of bypassing them. Make this option true by default (a change to the current behavior). Add a checkbox in the customize dialog to toggle this option.
This commit is contained in:
parent
d015b1aed0
commit
a9c460802b
|
@ -295,6 +295,7 @@ namespace BizHawk.Client.Common
|
|||
public RecentFiles RecentLua = new RecentFiles(8);
|
||||
public RecentFiles RecentLuaSession = new RecentFiles(8);
|
||||
public bool DisableLuaScriptsOnLoad = false;
|
||||
public bool RunLuaDuringTurbo = true;
|
||||
|
||||
// Watch Settings
|
||||
public RecentFiles RecentWatches = new RecentFiles(8);
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.LogWindowAsConsoleCheckbox = new System.Windows.Forms.CheckBox();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.LuaDuringTurboCheckbox = new System.Windows.Forms.CheckBox();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
|
@ -248,6 +249,7 @@
|
|||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.LuaDuringTurboCheckbox);
|
||||
this.tabPage3.Controls.Add(this.label12);
|
||||
this.tabPage3.Controls.Add(this.label13);
|
||||
this.tabPage3.Controls.Add(this.FrameAdvSkipLagCheckbox);
|
||||
|
@ -338,6 +340,16 @@
|
|||
this.LogWindowAsConsoleCheckbox.Text = "Create the log window as a console window";
|
||||
this.LogWindowAsConsoleCheckbox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// LuaDuringTurboCheckbox
|
||||
//
|
||||
this.LuaDuringTurboCheckbox.AutoSize = true;
|
||||
this.LuaDuringTurboCheckbox.Location = new System.Drawing.Point(6, 180);
|
||||
this.LuaDuringTurboCheckbox.Name = "LuaDuringTurboCheckbox";
|
||||
this.LuaDuringTurboCheckbox.Size = new System.Drawing.Size(166, 17);
|
||||
this.LuaDuringTurboCheckbox.TabIndex = 15;
|
||||
this.LuaDuringTurboCheckbox.Text = "Run lua scripts when turboing";
|
||||
this.LuaDuringTurboCheckbox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EmuHawkOptions
|
||||
//
|
||||
this.AcceptButton = this.OkBtn;
|
||||
|
@ -391,5 +403,6 @@
|
|||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.CheckBox StartFullScreenCheckbox;
|
||||
private System.Windows.Forms.CheckBox LuaDuringTurboCheckbox;
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
BackupSRamCheckbox.Checked = Global.Config.BackupSaveram;
|
||||
FrameAdvSkipLagCheckbox.Checked = Global.Config.SkipLagFrame;
|
||||
LogWindowAsConsoleCheckbox.Checked = Global.Config.WIN32_CONSOLE;
|
||||
LuaDuringTurboCheckbox.Checked = Global.Config.RunLuaDuringTurbo;
|
||||
|
||||
if (LogConsole.ConsoleVisible)
|
||||
{
|
||||
|
@ -58,6 +59,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.BackupSaveram = BackupSRamCheckbox.Checked;
|
||||
Global.Config.SkipLagFrame = FrameAdvSkipLagCheckbox.Checked;
|
||||
Global.Config.WIN32_CONSOLE = LogWindowAsConsoleCheckbox.Checked;
|
||||
Global.Config.RunLuaDuringTurbo = LuaDuringTurboCheckbox.Checked;
|
||||
|
||||
Close();
|
||||
DialogResult = DialogResult.OK;
|
||||
|
|
|
@ -549,6 +549,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void FastUpdateAfter()
|
||||
{
|
||||
if (Global.Config.RunLuaDuringTurbo && Has<LuaConsole>())
|
||||
{
|
||||
LuaConsole.ResumeScripts(true);
|
||||
}
|
||||
|
||||
var afterList = _tools.Where(x => !x.UpdateBefore);
|
||||
foreach (var tool in afterList)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue