Autofire Config - Add flag for the "Take lag frames into account" feature, true by default

This commit is contained in:
andres.delikat 2011-08-29 22:25:40 +00:00
parent aba919874d
commit 4ef00921e9
5 changed files with 25 additions and 7 deletions

View File

@ -129,6 +129,7 @@
public bool BackupSavestates = true;
public int AutofireOn = 1;
public int AutofireOff = 1;
public bool AutofireLagFrames = true;
// Run-Control settings
public int FrameProgressDelayMs = 500; //how long until a frame advance hold turns into a frame progress?

View File

@ -1643,7 +1643,7 @@ namespace BizHawk.MultiClient
UpdateTools();
if (Global.Emulator.IsLagFrame)
if (Global.Emulator.IsLagFrame && Global.Config.AutofireLagFrames)
{
Global.AutoFireController.IncrementStarts();
}

View File

@ -36,6 +36,7 @@
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.LagFrameCheck = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.OnNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.OffNumeric)).BeginInit();
this.groupBox1.SuspendLayout();
@ -44,7 +45,7 @@
// Ok
//
this.Ok.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Ok.Location = new System.Drawing.Point(42, 117);
this.Ok.Location = new System.Drawing.Point(120, 148);
this.Ok.Name = "Ok";
this.Ok.Size = new System.Drawing.Size(75, 23);
this.Ok.TabIndex = 5;
@ -56,7 +57,7 @@
//
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(123, 117);
this.Cancel.Location = new System.Drawing.Point(201, 148);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 7;
@ -139,13 +140,24 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Autofire Pattern";
//
// LagFrameCheck
//
this.LagFrameCheck.AutoSize = true;
this.LagFrameCheck.Location = new System.Drawing.Point(13, 100);
this.LagFrameCheck.Name = "LagFrameCheck";
this.LagFrameCheck.Size = new System.Drawing.Size(164, 17);
this.LagFrameCheck.TabIndex = 8;
this.LagFrameCheck.Text = "Take lag frames into account";
this.LagFrameCheck.UseVisualStyleBackColor = true;
//
// AutofireConfig
//
this.AcceptButton = this.Ok;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(210, 152);
this.ClientSize = new System.Drawing.Size(288, 183);
this.Controls.Add(this.LagFrameCheck);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.Cancel);
this.Controls.Add(this.Ok);
@ -161,6 +173,7 @@
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -173,5 +186,6 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox1;
public System.Windows.Forms.NumericUpDown OnNumeric;
private System.Windows.Forms.CheckBox LagFrameCheck;
}
}

View File

@ -31,12 +31,15 @@ namespace BizHawk.MultiClient
OffNumeric.Value = OffNumeric.Maximum;
else
OffNumeric.Value = Global.Config.AutofireOff;
LagFrameCheck.Checked = Global.Config.AutofireLagFrames;
}
private void Ok_Click(object sender, EventArgs e)
{
Global.AutoFireController.On = Global.Config.AutofireOn = (int)OnNumeric.Value;
Global.AutoFireController.Off = Global.Config.AutofireOff = (int)OffNumeric.Value;
Global.Config.AutofireLagFrames = LagFrameCheck.Checked;
this.Close();
}

View File

@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAAAAAAAEAIAAoIAQAZgAAAICAAAABACAAKAgBAI4gBABAQAAAAQAgAChCAAC2KAUAMDAAAAEA