bnses options - remove profile options

This commit is contained in:
adelikat 2017-06-12 20:55:47 -05:00
parent ac6b18c137
commit 971c6a9df6
2 changed files with 92 additions and 210 deletions

View File

@ -28,166 +28,99 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.btnOk = new System.Windows.Forms.Button(); this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button();
this.rbCompatibility = new System.Windows.Forms.RadioButton(); this.cbDoubleSize = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.lblDoubleSize = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.cbForceDeterminism = new System.Windows.Forms.CheckBox();
this.rbAccuracy = new System.Windows.Forms.RadioButton(); this.label3 = new System.Windows.Forms.Label();
this.rbPerformance = new System.Windows.Forms.RadioButton(); this.SuspendLayout();
this.cbDoubleSize = new System.Windows.Forms.CheckBox(); //
this.lblDoubleSize = new System.Windows.Forms.Label(); // btnOk
this.cbForceDeterminism = new System.Windows.Forms.CheckBox(); //
this.label3 = new System.Windows.Forms.Label(); this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.SuspendLayout(); this.btnOk.Location = new System.Drawing.Point(136, 193);
this.SuspendLayout(); this.btnOk.Name = "btnOk";
// this.btnOk.Size = new System.Drawing.Size(75, 23);
// btnOk this.btnOk.TabIndex = 0;
// this.btnOk.Text = "OK";
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnOk.UseVisualStyleBackColor = true;
this.btnOk.Location = new System.Drawing.Point(136, 286); this.btnOk.Click += new System.EventHandler(this.BtnOk_Click);
this.btnOk.Name = "btnOk"; //
this.btnOk.Size = new System.Drawing.Size(75, 23); // btnCancel
this.btnOk.TabIndex = 0; //
this.btnOk.Text = "OK"; this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.UseVisualStyleBackColor = true; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnOk.Click += new System.EventHandler(this.BtnOk_Click); this.btnCancel.Location = new System.Drawing.Point(217, 193);
// this.btnCancel.Name = "btnCancel";
// btnCancel this.btnCancel.Size = new System.Drawing.Size(75, 23);
// this.btnCancel.TabIndex = 1;
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.Text = "Cancel";
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Location = new System.Drawing.Point(217, 286); this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
this.btnCancel.Name = "btnCancel"; //
this.btnCancel.Size = new System.Drawing.Size(75, 23); // cbDoubleSize
this.btnCancel.TabIndex = 1; //
this.btnCancel.Text = "Cancel"; this.cbDoubleSize.AutoSize = true;
this.btnCancel.UseVisualStyleBackColor = true; this.cbDoubleSize.Location = new System.Drawing.Point(18, 20);
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click); this.cbDoubleSize.Name = "cbDoubleSize";
// this.cbDoubleSize.Size = new System.Drawing.Size(178, 17);
// rbCompatibility this.cbDoubleSize.TabIndex = 6;
// this.cbDoubleSize.Text = "Always Double-Size Framebuffer";
this.rbCompatibility.AutoSize = true; this.cbDoubleSize.UseVisualStyleBackColor = true;
this.rbCompatibility.Location = new System.Drawing.Point(6, 19); this.cbDoubleSize.CheckedChanged += new System.EventHandler(this.CbDoubleSize_CheckedChanged);
this.rbCompatibility.Name = "rbCompatibility"; //
this.rbCompatibility.Size = new System.Drawing.Size(202, 17); // lblDoubleSize
this.rbCompatibility.TabIndex = 2; //
this.rbCompatibility.TabStop = true; this.lblDoubleSize.Location = new System.Drawing.Point(36, 41);
this.rbCompatibility.Text = "Compatibility (more debug tools work!)"; this.lblDoubleSize.Name = "lblDoubleSize";
this.rbCompatibility.UseVisualStyleBackColor = true; this.lblDoubleSize.Size = new System.Drawing.Size(254, 57);
// this.lblDoubleSize.TabIndex = 7;
// groupBox1 this.lblDoubleSize.Text = "Some games are changing the resolution constantly (e.g. SD3) so this option can f" +
//
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.rbAccuracy);
this.groupBox1.Controls.Add(this.rbPerformance);
this.groupBox1.Controls.Add(this.rbCompatibility);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(277, 108);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Core Selection";
//
// label2
//
this.label2.Location = new System.Drawing.Point(72, 85);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(136, 21);
this.label2.TabIndex = 8;
this.label2.Text = "NOT SUPPORTED YET!";
//
// rbAccuracy
//
this.rbAccuracy.AutoSize = true;
this.rbAccuracy.Enabled = false;
this.rbAccuracy.Location = new System.Drawing.Point(6, 65);
this.rbAccuracy.Name = "rbAccuracy";
this.rbAccuracy.Size = new System.Drawing.Size(224, 17);
this.rbAccuracy.TabIndex = 4;
this.rbAccuracy.TabStop = true;
this.rbAccuracy.Text = "Accuracy (only to fix bugs in Compatibility!)";
this.rbAccuracy.UseVisualStyleBackColor = true;
this.rbAccuracy.CheckedChanged += new System.EventHandler(this.RbAccuracy_CheckedChanged);
//
// rbPerformance
//
this.rbPerformance.AutoSize = true;
this.rbPerformance.Location = new System.Drawing.Point(6, 42);
this.rbPerformance.Name = "rbPerformance";
this.rbPerformance.Size = new System.Drawing.Size(202, 17);
this.rbPerformance.TabIndex = 3;
this.rbPerformance.TabStop = true;
this.rbPerformance.Text = "Performance (only for casual gaming!)";
this.rbPerformance.UseVisualStyleBackColor = true;
//
// cbDoubleSize
//
this.cbDoubleSize.AutoSize = true;
this.cbDoubleSize.Location = new System.Drawing.Point(18, 130);
this.cbDoubleSize.Name = "cbDoubleSize";
this.cbDoubleSize.Size = new System.Drawing.Size(178, 17);
this.cbDoubleSize.TabIndex = 6;
this.cbDoubleSize.Text = "Always Double-Size Framebuffer";
this.cbDoubleSize.UseVisualStyleBackColor = true;
this.cbDoubleSize.CheckedChanged += new System.EventHandler(this.CbDoubleSize_CheckedChanged);
//
// lblDoubleSize
//
this.lblDoubleSize.Location = new System.Drawing.Point(36, 151);
this.lblDoubleSize.Name = "lblDoubleSize";
this.lblDoubleSize.Size = new System.Drawing.Size(254, 57);
this.lblDoubleSize.TabIndex = 7;
this.lblDoubleSize.Text = "Some games are changing the resolution constantly (e.g. SD3) so this option can f" +
"orce the SNES output to stay double-size always. NOTE: The Accuracy core runs as" + "orce the SNES output to stay double-size always. NOTE: The Accuracy core runs as" +
" if this is selected.\r\n"; " if this is selected.\r\n";
// //
// cbForceDeterminism // cbForceDeterminism
// //
this.cbForceDeterminism.AutoSize = true; this.cbForceDeterminism.AutoSize = true;
this.cbForceDeterminism.Location = new System.Drawing.Point(19, 212); this.cbForceDeterminism.Location = new System.Drawing.Point(19, 102);
this.cbForceDeterminism.Name = "cbForceDeterminism"; this.cbForceDeterminism.Name = "cbForceDeterminism";
this.cbForceDeterminism.Size = new System.Drawing.Size(113, 17); this.cbForceDeterminism.Size = new System.Drawing.Size(113, 17);
this.cbForceDeterminism.TabIndex = 8; this.cbForceDeterminism.TabIndex = 8;
this.cbForceDeterminism.Text = "Force Determinism"; this.cbForceDeterminism.Text = "Force Determinism";
this.cbForceDeterminism.UseVisualStyleBackColor = true; this.cbForceDeterminism.UseVisualStyleBackColor = true;
this.cbForceDeterminism.CheckedChanged += new System.EventHandler(this.CbForceDeterminism_CheckedChanged); //
// // label3
// label3 //
// this.label3.Location = new System.Drawing.Point(38, 126);
this.label3.Location = new System.Drawing.Point(38, 236); this.label3.Name = "label3";
this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(251, 41);
this.label3.Size = new System.Drawing.Size(251, 41); this.label3.TabIndex = 9;
this.label3.TabIndex = 9; this.label3.Text = "Guarantee deterministic emulation by savestating every frame. Don\'t TAS without i" +
this.label3.Text = "Guarantee deterministic emulation by savestating every frame. Don\'t TAS without i" +
"t! Only ~75% of runs sync without it, but speed boost is ~30%."; "t! Only ~75% of runs sync without it, but speed boost is ~30%.";
// //
// SNESOptions // SNESOptions
// //
this.AcceptButton = this.btnOk; this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel; this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(304, 321); this.ClientSize = new System.Drawing.Size(304, 228);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
this.Controls.Add(this.cbForceDeterminism); this.Controls.Add(this.cbForceDeterminism);
this.Controls.Add(this.lblDoubleSize); this.Controls.Add(this.lblDoubleSize);
this.Controls.Add(this.cbDoubleSize); this.Controls.Add(this.cbDoubleSize);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOk);
this.Controls.Add(this.btnOk); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false;
this.MaximizeBox = false; this.MinimizeBox = false;
this.MinimizeBox = false; this.Name = "SNESOptions";
this.Name = "SNESOptions"; this.ShowIcon = false;
this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "SNES Options";
this.Text = "SNES Options"; this.ResumeLayout(false);
this.Load += new System.EventHandler(this.SNESOptions_Load); this.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
} }
@ -195,13 +128,8 @@
private System.Windows.Forms.Button btnOk; private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.RadioButton rbCompatibility;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton rbPerformance;
private System.Windows.Forms.CheckBox cbDoubleSize; private System.Windows.Forms.CheckBox cbDoubleSize;
private System.Windows.Forms.Label lblDoubleSize; private System.Windows.Forms.Label lblDoubleSize;
private System.Windows.Forms.RadioButton rbAccuracy;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox cbForceDeterminism; private System.Windows.Forms.CheckBox cbForceDeterminism;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
} }

View File

@ -23,7 +23,7 @@ namespace BizHawk.Client.EmuHawk
{ {
AlwaysDoubleSize = s.AlwaysDoubleSize, AlwaysDoubleSize = s.AlwaysDoubleSize,
ForceDeterminism = s.ForceDeterminism, ForceDeterminism = s.ForceDeterminism,
Profile = ss.Profile //Profile = ss.Profile
}; };
var result = dlg.ShowDialog(owner); var result = dlg.ShowDialog(owner);
@ -31,47 +31,12 @@ namespace BizHawk.Client.EmuHawk
{ {
s.AlwaysDoubleSize = dlg.AlwaysDoubleSize; s.AlwaysDoubleSize = dlg.AlwaysDoubleSize;
s.ForceDeterminism = dlg.ForceDeterminism; s.ForceDeterminism = dlg.ForceDeterminism;
ss.Profile = dlg.Profile; //ss.Profile = dlg.Profile;
GlobalWin.MainForm.PutCoreSettings(s); GlobalWin.MainForm.PutCoreSettings(s);
GlobalWin.MainForm.PutCoreSyncSettings(ss); GlobalWin.MainForm.PutCoreSyncSettings(ss);
} }
} }
private void SNESOptions_Load(object sender, EventArgs e)
{
rbAccuracy.Visible = VersionInfo.DeveloperBuild;
}
private string Profile
{
get
{
if (rbCompatibility.Checked)
{
return "Compatibility";
}
if (rbPerformance.Checked)
{
return "Performance";
}
if (rbAccuracy.Checked)
{
return "Accuracy";
}
throw new InvalidOperationException();
}
set
{
rbCompatibility.Checked = value == "Compatibility";
rbPerformance.Checked = value == "Performance";
rbAccuracy.Checked = value == "Accuracy";
}
}
private bool AlwaysDoubleSize private bool AlwaysDoubleSize
{ {
get get
@ -99,13 +64,6 @@ namespace BizHawk.Client.EmuHawk
_suppressDoubleSize = false; _suppressDoubleSize = false;
} }
private void RbAccuracy_CheckedChanged(object sender, EventArgs e)
{
cbDoubleSize.Enabled = !rbAccuracy.Checked;
lblDoubleSize.ForeColor = cbDoubleSize.Enabled ? System.Drawing.SystemColors.ControlText : System.Drawing.SystemColors.GrayText;
RefreshDoubleSizeOption();
}
private void CbDoubleSize_CheckedChanged(object sender, EventArgs e) private void CbDoubleSize_CheckedChanged(object sender, EventArgs e)
{ {
if (_suppressDoubleSize) if (_suppressDoubleSize)
@ -116,10 +74,6 @@ namespace BizHawk.Client.EmuHawk
_userDoubleSizeOption = cbDoubleSize.Checked; _userDoubleSizeOption = cbDoubleSize.Checked;
} }
private void CbForceDeterminism_CheckedChanged(object sender, EventArgs e)
{
}
private void BtnOk_Click(object sender, EventArgs e) private void BtnOk_Click(object sender, EventArgs e)
{ {
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;