Remove snowy null emulator option and simplify Null Emulator

This commit is contained in:
adelikat 2019-12-06 18:42:00 -06:00
parent dcc853af6d
commit 7d8522e0b3
4 changed files with 13 additions and 503 deletions
BizHawk.Client.EmuHawk
BizHawk.Emulation.Common/Base Implementations

View File

@ -236,7 +236,7 @@ namespace BizHawk.Client.EmuHawk
var comm = CreateCoreComm();
CoreFileProvider.SyncCoreCommInputSignals(comm);
Emulator = new NullEmulator(comm, Global.Config.GetCoreSettings<NullEmulator>());
Emulator = new NullEmulator(comm);
Global.ActiveController = new Controller(NullController.Instance.Definition);
Global.AutoFireController = _autofireNullControls;
Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
@ -3835,7 +3835,7 @@ namespace BizHawk.Client.EmuHawk
Emulator.Dispose();
var coreComm = CreateCoreComm();
CoreFileProvider.SyncCoreCommInputSignals(coreComm);
Emulator = new NullEmulator(coreComm, Global.Config.GetCoreSettings<NullEmulator>());
Emulator = new NullEmulator(coreComm);
ClientApi.UpdateEmulatorAndVP(Emulator);
Global.ActiveController = new Controller(NullController.Instance.Definition);
Global.AutoFireController = _autofireNullControls;
@ -3855,7 +3855,7 @@ namespace BizHawk.Client.EmuHawk
CloseGame(clearSram);
var coreComm = CreateCoreComm();
CoreFileProvider.SyncCoreCommInputSignals(coreComm);
Emulator = new NullEmulator(coreComm, Global.Config.GetCoreSettings<NullEmulator>());
Emulator = new NullEmulator(coreComm);
Global.Game = GameInfo.NullInstance;
GlobalWin.Tools.Restart();

View File

@ -59,8 +59,6 @@
this.label3 = new System.Windows.Forms.Label();
this.txtCustomARWidth = new System.Windows.Forms.TextBox();
this.rbUseCustom = new System.Windows.Forms.RadioButton();
this.label2 = new System.Windows.Forms.Label();
this.checkSnowyNullEmulator = new System.Windows.Forms.CheckBox();
this.rbOpenGL = new System.Windows.Forms.RadioButton();
this.label5 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
@ -440,25 +438,6 @@
this.rbUseCustom.Text = "Use custom size:";
this.rbUseCustom.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.Location = new System.Drawing.Point(6, 128);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(398, 27);
this.label2.TabIndex = 17;
this.label2.Text = "Some people think the white noise is a great idea, and some people don\'t. Disabli" +
"ng this displays black instead.";
//
// checkSnowyNullEmulator
//
this.checkSnowyNullEmulator.AutoSize = true;
this.checkSnowyNullEmulator.Location = new System.Drawing.Point(6, 108);
this.checkSnowyNullEmulator.Name = "checkSnowyNullEmulator";
this.checkSnowyNullEmulator.Size = new System.Drawing.Size(159, 17);
this.checkSnowyNullEmulator.TabIndex = 16;
this.checkSnowyNullEmulator.Text = "Enable Snowy Null Emulator";
this.checkSnowyNullEmulator.UseVisualStyleBackColor = true;
//
// rbOpenGL
//
this.rbOpenGL.AutoSize = true;
@ -760,8 +739,6 @@
// tpMisc
//
this.tpMisc.Controls.Add(this.groupBox5);
this.tpMisc.Controls.Add(this.label2);
this.tpMisc.Controls.Add(this.checkSnowyNullEmulator);
this.tpMisc.Location = new System.Drawing.Point(4, 22);
this.tpMisc.Name = "tpMisc";
this.tpMisc.Size = new System.Drawing.Size(528, 291);
@ -1054,8 +1031,6 @@
private System.Windows.Forms.RadioButton rbUseRaw;
private System.Windows.Forms.RadioButton rbUseSystem;
private System.Windows.Forms.GroupBox grpARSelection;
private System.Windows.Forms.CheckBox checkSnowyNullEmulator;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblScanlines;
private System.Windows.Forms.TextBox txtCustomARHeight;
private System.Windows.Forms.Label label3;

View File

@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Windows.Forms;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
using BizHawk.Common;
@ -58,16 +57,6 @@ namespace BizHawk.Client.EmuHawk
nudPrescale.Value = Global.Config.DispPrescale;
// null emulator config hack
{
NullEmulator.NullEmulatorSettings s;
if (Global.Emulator is NullEmulator)
s = (Global.Emulator as dynamic).GetSettings();
else
s = (NullEmulator.NullEmulatorSettings)Global.Config.GetCoreSettings<NullEmulator>();
checkSnowyNullEmulator.Checked = s.SnowyDisplay;
}
if (Global.Config.DispManagerAR == Config.EDispManagerAR.None)
rbUseRaw.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
@ -145,20 +134,6 @@ namespace BizHawk.Client.EmuHawk
if (rbDisplayMinimal.Checked) Global.Config.DispSpeedupFeatures = 1;
if (rbDisplayAbsoluteZero.Checked) Global.Config.DispSpeedupFeatures = 0;
// HACK:: null emulator's settings don't persist to config normally
{
NullEmulator.NullEmulatorSettings s;
if (Global.Emulator is NullEmulator)
s = (Global.Emulator as dynamic).GetSettings();
else
s = (NullEmulator.NullEmulatorSettings)Global.Config.GetCoreSettings<NullEmulator>();
s.SnowyDisplay = checkSnowyNullEmulator.Checked;
Global.Config.PutCoreSettings<NullEmulator>(s);
if (Global.Emulator is NullEmulator)
(Global.Emulator as dynamic).PutSettings(s);
}
if (rbUseRaw.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.None;
else if (rbUseSystem.Checked)

File diff suppressed because one or more lines are too long