diff --git a/BizHawk.Client.EmuHawk/BizBox.cs b/BizHawk.Client.EmuHawk/BizBox.cs index 0e4d0391db..63bc0a90a9 100644 --- a/BizHawk.Client.EmuHawk/BizBox.cs +++ b/BizHawk.Client.EmuHawk/BizBox.cs @@ -23,15 +23,15 @@ namespace BizHawk.Client.EmuHawk private void BizBox_Load(object sender, EventArgs e) { - if (MainForm.INTERIM) + if (VersionInfo.INTERIM) { Text = " BizHawk (SVN r" + SubWCRev.SVN_REV + ")"; } else { - Text = MainForm.EMUVERSION; + Text = "Version " + VersionInfo.MAINVERSION; } - VersionLabel.Text = MainForm.EMUVERSION + " Released " + MainForm.RELEASEDATE; + VersionLabel.Text = "Version " + VersionInfo.MAINVERSION + " Released " + VersionInfo.RELEASEDATE; } private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index 63795c6c25..8b3ff66251 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1763,7 +1763,7 @@ namespace BizHawk.Client.EmuHawk private void AboutMenuItem_Click(object sender, EventArgs e) { - if (INTERIM) + if (VersionInfo.INTERIM) { new AboutBox().ShowDialog(); } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 01ebafa4b9..faeca9986f 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk private void MainForm_Load(object sender, EventArgs e) { - Text = "BizHawk" + (INTERIM ? " (interim) " : ""); + Text = "BizHawk" + (VersionInfo.INTERIM ? " (interim) " : ""); //Hide Status bar icons PlayRecordStatusButton.Visible = false; @@ -314,10 +314,9 @@ namespace BizHawk.Client.EmuHawk PauseEmulator(); } - if (!INTERIM) + if (!VersionInfo.INTERIM) { NESDebuggerMenuItem.Enabled = false; - //luaConsoleToolStripMenuItem.Enabled = false; } // start dumping, if appropriate @@ -400,9 +399,6 @@ namespace BizHawk.Client.EmuHawk #region Properties - public static bool INTERIM = true; - public const string EMUVERSION = "Version " + VersionInfo.MAINVERSION; - public const string RELEASEDATE = "August 22, 2013"; public string CurrentlyOpenRom; public bool PauseAVI = false; public bool PressFrameAdvance = false; @@ -1591,7 +1587,7 @@ namespace BizHawk.Client.EmuHawk case "DGB": str = "Game Boy Link"; break; } - if (INTERIM) str += " (interim)"; + if (VersionInfo.INTERIM) str += " (interim)"; return str; } @@ -2027,7 +2023,7 @@ namespace BizHawk.Client.EmuHawk var ofd = new OpenFileDialog { InitialDirectory = PathManager.GetRomsPath(Global.Emulator.SystemId) }; //adelikat: ugly design for this, I know - if (INTERIM) + if (VersionInfo.INTERIM) { ofd.Filter = FormatFilter( "Rom Files", "*.nes;*.fds;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.a78;*.cue;*.exe;*.gb;*.gbc;*.gen;*.md;*.col;.int;*.smc;*.sfc;*.prg;*.d64;*.g64;*.crt;*.sgb;*.xml;*.z64;*.v64;*.n64;%ARCH%", @@ -2971,9 +2967,9 @@ namespace BizHawk.Client.EmuHawk #region Scheduled for refactor - public string GetEmuVersion() //This and EMUVERSION don't need to be on mainform + public string GetEmuVersion() //This doesn't need to be on mainform { - return INTERIM ? "SVN " + SubWCRev.SVN_REV : EMUVERSION; + return VersionInfo.INTERIM ? "SVN " + SubWCRev.SVN_REV : ("Version " + VersionInfo.MAINVERSION); } private void NESSpeicalMenuAdd(string name, string button, string msg) //TODO: don't do this, put these into the menu but hide them in the dropdownopened event as needed @@ -3483,7 +3479,7 @@ namespace BizHawk.Client.EmuHawk nextEmulator = c64; break; case "GBA": - if (INTERIM) + if (VersionInfo.INTERIM) { string gbabiospath = Global.FirmwareManager.Request("GBA", "Bios"); byte[] gbabios; @@ -3746,7 +3742,7 @@ namespace BizHawk.Client.EmuHawk RewireSound(); ResetRewindBuffer(); Cheats_Restart(); - Text = "BizHawk" + (INTERIM ? " (interim) " : ""); + Text = "BizHawk" + (VersionInfo.INTERIM ? " (interim) " : String.Empty); HandlePlatformMenus(); StateSlots.Clear(); UpdateDumpIcon(); diff --git a/BizHawk.Client.EmuHawk/Program.cs b/BizHawk.Client.EmuHawk/Program.cs index c54a12ce30..8fdec38162 100644 --- a/BizHawk.Client.EmuHawk/Program.cs +++ b/BizHawk.Client.EmuHawk/Program.cs @@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk // this check has to be done VERY early. i stepped through a debug build with wrong .dll versions purposely used, // and there was a TypeLoadException before the first line of SubMain was reached (some static ColorType init?) // zero 25-dec-2012 - only do for public builds. its annoying during development - if (!MainForm.INTERIM) + if (!VersionInfo.INTERIM) { var thisversion = typeof(Program).Assembly.GetName().Version; var utilversion = Assembly.LoadWithPartialName("Bizhawk.Client.Common").GetName().Version; diff --git a/BizHawk.Client.EmuHawk/config/ControllerConfig.cs b/BizHawk.Client.EmuHawk/config/ControllerConfig.cs index 652a2c4a19..e370d98b4b 100644 --- a/BizHawk.Client.EmuHawk/config/ControllerConfig.cs +++ b/BizHawk.Client.EmuHawk/config/ControllerConfig.cs @@ -146,8 +146,10 @@ namespace BizHawk.Client.EmuHawk SetControllerPicture(def.Name); - if (!MainForm.INTERIM) + if (!VersionInfo.INTERIM) + { buttonSaveDefaults.Hide(); + } ResumeLayout(); } diff --git a/BizHawk.Client.EmuHawk/config/PathConfig.cs b/BizHawk.Client.EmuHawk/config/PathConfig.cs index 05b67de4f3..7edc2f8119 100644 --- a/BizHawk.Client.EmuHawk/config/PathConfig.cs +++ b/BizHawk.Client.EmuHawk/config/PathConfig.cs @@ -18,7 +18,7 @@ namespace BizHawk.Client.EmuHawk private void LockDownCores() { - if (!MainForm.INTERIM) + if (!VersionInfo.INTERIM) { string[] coresToHide = { "PSX", "GBA", "INTV", "C64", "GEN" }; diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index dbe785c9fd..dace895c02 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -112,10 +112,8 @@ namespace BizHawk.Client.EmuHawk } } - newStripButton1.Visible = MainForm.INTERIM; - newScriptToolStripMenuItem.Visible = MainForm.INTERIM; - newStripButton1.Enabled = MainForm.INTERIM; - newScriptToolStripMenuItem.Enabled = MainForm.INTERIM; + newStripButton1.Visible = VersionInfo.INTERIM; + newScriptToolStripMenuItem.Visible = VersionInfo.INTERIM; } private void StopScript(int x) @@ -668,7 +666,7 @@ namespace BizHawk.Client.EmuHawk private void EditToolstripButton_Click(object sender, EventArgs e) { - if (MainForm.INTERIM) + if (VersionInfo.INTERIM) { DoLuaWriter(); } diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio.cs index c3992ab0ba..6c77d17685 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio.cs @@ -175,7 +175,7 @@ namespace BizHawk.Client.EmuHawk private void TAStudio_Load(object sender, EventArgs e) { - if (!MainForm.INTERIM) + if (!VersionInfo.INTERIM) { newProjectToolStripMenuItem.Enabled = false; openProjectToolStripMenuItem.Enabled = false; diff --git a/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs b/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs index 67439a8ab1..4ad4485dc3 100644 --- a/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs +++ b/BizHawk.Emulation.Common/Interfaces/Base Implementations/NullEmulator.cs @@ -29,6 +29,7 @@ namespace BizHawk.Emulation.Common { new MemoryDomain("Main RAM", 1, MemoryDomain.Endian.Little, addr => 0, (a, v) => { }) }); + memoryDomains = new MemoryDomainList(domains); } public void ResetCounters() { diff --git a/VersionInfo.cs b/VersionInfo.cs index 32214072a6..7468b2fd8d 100644 --- a/VersionInfo.cs +++ b/VersionInfo.cs @@ -1,4 +1,6 @@ static class VersionInfo { public const string MAINVERSION = "1.5.2"; + public const string RELEASEDATE = "August 22, 2013"; + public static bool INTERIM = true; }