From 3d833af6172729d24f3490129f82311e3f8d660b Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 21 Jan 2020 08:05:56 -0600 Subject: [PATCH] break out enums from Config.cs --- BizHawk.Client.Common/SavestateManager.cs | 4 +- BizHawk.Client.Common/config/Config.cs | 42 ------------------ BizHawk.Client.Common/config/ConfigEnums.cs | 44 +++++++++++++++++++ .../DisplayManager/DisplayManager.cs | 12 ++--- BizHawk.Client.EmuHawk/MainForm.Events.cs | 6 +-- BizHawk.Client.EmuHawk/MainForm.cs | 6 +-- BizHawk.Client.EmuHawk/Program.cs | 12 ++--- BizHawk.Client.EmuHawk/Sound/Sound.cs | 6 +-- .../config/DisplayConfig.cs | 28 ++++++------ .../config/EmuHawkOptions.cs | 8 ++-- .../config/PSX/PSXOptions.cs | 2 +- .../config/ProfileConfig.cs | 28 ++++++------ BizHawk.Client.EmuHawk/config/RewindConfig.cs | 12 ++--- BizHawk.Client.EmuHawk/config/SoundConfig.cs | 12 ++--- BizHawk.sln.DotSettings | 4 ++ 15 files changed, 116 insertions(+), 110 deletions(-) create mode 100644 BizHawk.Client.Common/config/ConfigEnums.cs diff --git a/BizHawk.Client.Common/SavestateManager.cs b/BizHawk.Client.Common/SavestateManager.cs index 3b1820f3f4..ef4cb2483b 100644 --- a/BizHawk.Client.Common/SavestateManager.cs +++ b/BizHawk.Client.Common/SavestateManager.cs @@ -16,8 +16,8 @@ namespace BizHawk.Client.Common // the old method of text savestate save is now gone. // a text savestate is just like a binary savestate, but with a different core lump using var bs = new BinaryStateSaver(filename); - if (Global.Config.SaveStateType == Config.SaveStateTypeE.Text - || (Global.Config.SaveStateType == Config.SaveStateTypeE.Default && !core.BinarySaveStatesPreferred)) + if (Global.Config.SaveStateType == SaveStateTypeE.Text + || (Global.Config.SaveStateType == SaveStateTypeE.Default && !core.BinarySaveStatesPreferred)) { // text savestate format using (new SimpleTime("Save Core")) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 605c16d8d0..35c98b9b25 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -122,55 +122,13 @@ namespace BizHawk.Client.Common /// public int FlushSaveRamFrames; - public enum ELuaEngine - { - /// Don't change this member's ordinal (don't reorder) without changing BizHawk.Client.EmuHawk.Program.CurrentDomain_AssemblyResolve - LuaPlusLuaInterface, - NLuaPlusKopiLua - } - /// Don't rename this without changing BizHawk.Client.EmuHawk.Program.CurrentDomain_AssemblyResolve public ELuaEngine LuaEngine = ELuaEngine.LuaPlusLuaInterface; public bool TurboSeek { get; set; } - public enum EDispMethod - { - OpenGL, GdiPlus, SlimDX9 - } - - public enum ESoundOutputMethod - { - DirectSound, XAudio2, OpenAL, Dummy - } - - public enum EDispManagerAR - { - None, - System, - - // actually, custom SIZE (fixme on major release) - Custom, - CustomRatio - } - - public enum SaveStateTypeE - { - Default, Binary, Text - } - public MovieEndAction MovieEndAction = MovieEndAction.Finish; - public enum ClientProfile - { - Unknown = 0, - Casual = 1, - Longplay = 2, - Tas = 3, - N64Tas = 4, - Custom = 99 - } - public ClientProfile SelectedProfile = ClientProfile.Unknown; // N64 diff --git a/BizHawk.Client.Common/config/ConfigEnums.cs b/BizHawk.Client.Common/config/ConfigEnums.cs new file mode 100644 index 0000000000..90b5e3f70e --- /dev/null +++ b/BizHawk.Client.Common/config/ConfigEnums.cs @@ -0,0 +1,44 @@ +namespace BizHawk.Client.Common +{ + public enum ELuaEngine + { + /// Don't change this member's ordinal (don't reorder) without changing BizHawk.Client.EmuHawk.Program.CurrentDomain_AssemblyResolve + LuaPlusLuaInterface, + NLuaPlusKopiLua + } + + public enum EDispMethod + { + OpenGL, GdiPlus, SlimDX9 + } + + public enum ESoundOutputMethod + { + DirectSound, XAudio2, OpenAL, Dummy + } + + public enum EDispManagerAR + { + None, + System, + + // actually, custom SIZE (fixme on major release) + Custom, + CustomRatio + } + + public enum SaveStateTypeE + { + Default, Binary, Text + } + + public enum ClientProfile + { + Unknown = 0, + Casual = 1, + Longplay = 2, + Tas = 3, + N64Tas = 4, + Custom = 99 + } +} diff --git a/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs b/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs index 9b81333ecf..7e3138a681 100644 --- a/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs +++ b/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs @@ -515,9 +515,9 @@ namespace BizHawk.Client.EmuHawk public Size CalculateClientSize(IVideoProvider videoProvider, int zoom) { bool arActive = Global.Config.DispFixAspectRatio; - bool arSystem = Global.Config.DispManagerAR == Config.EDispManagerAR.System; - bool arCustom = Global.Config.DispManagerAR == Config.EDispManagerAR.Custom; - bool arCustomRatio = Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio; + bool arSystem = Global.Config.DispManagerAR == EDispManagerAR.System; + bool arCustom = Global.Config.DispManagerAR == EDispManagerAR.Custom; + bool arCustomRatio = Global.Config.DispManagerAR == EDispManagerAR.CustomRatio; bool arCorrect = arSystem || arCustom || arCustomRatio; bool arInteger = Global.Config.DispFixScaleInteger; @@ -706,17 +706,17 @@ namespace BizHawk.Client.EmuHawk if (Global.Config.DispFixAspectRatio) { - if (Global.Config.DispManagerAR == Config.EDispManagerAR.System) + if (Global.Config.DispManagerAR == EDispManagerAR.System) { vw = videoProvider.VirtualWidth; vh = videoProvider.VirtualHeight; } - if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom) + if (Global.Config.DispManagerAR == EDispManagerAR.Custom) { vw = Global.Config.DispCustomUserARWidth; vh = Global.Config.DispCustomUserARHeight; } - if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio) + if (Global.Config.DispManagerAR == EDispManagerAR.CustomRatio) { FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out vw, out vh); } diff --git a/BizHawk.Client.EmuHawk/MainForm.Events.cs b/BizHawk.Client.EmuHawk/MainForm.Events.cs index 72d89700b9..9a4e21eb7e 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -3148,13 +3148,13 @@ namespace BizHawk.Client.EmuHawk SavestateTextContextMenuItem.Checked = false; switch (Config.SaveStateType) { - case Config.SaveStateTypeE.Binary: + case SaveStateTypeE.Binary: SavestateBinaryContextMenuItem.Checked = true; break; - case Config.SaveStateTypeE.Text: + case SaveStateTypeE.Text: SavestateTextContextMenuItem.Checked = true; break; - case Config.SaveStateTypeE.Default: + case SaveStateTypeE.Default: SavestateTypeDefaultContextMenuItem.Checked = true; break; } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index f1a7a670e5..69e7389721 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -339,14 +339,14 @@ namespace BizHawk.Client.EmuHawk catch { string message = "Couldn't initialize sound device! Try changing the output method in Sound config."; - if (Config.SoundOutputMethod == Config.ESoundOutputMethod.DirectSound) + if (Config.SoundOutputMethod == ESoundOutputMethod.DirectSound) { message = "Couldn't initialize DirectSound! Things may go poorly for you. Try changing your sound driver to 44.1khz instead of 48khz in mmsys.cpl."; } MessageBox.Show(message, "Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - Config.SoundOutputMethod = Config.ESoundOutputMethod.Dummy; + Config.SoundOutputMethod = ESoundOutputMethod.Dummy; GlobalWin.Sound = new Sound(Handle); } @@ -1190,7 +1190,7 @@ namespace BizHawk.Client.EmuHawk // Please note: It is important to do this before resizing things, otherwise momentarily a GL control without WS_BORDER will be at the magic dimensions and cause the flakeout if (!OSTailoredCode.IsUnixHost && Config.DispFullscreenHacks - && Config.DispMethod == Config.EDispMethod.OpenGL) + && Config.DispMethod == EDispMethod.OpenGL) { // ATTENTION: this causes the StatusBar to not work well, since the backcolor is now set to black instead of SystemColors.Control. // It seems that some StatusBar elements composite with the backcolor. diff --git a/BizHawk.Client.EmuHawk/Program.cs b/BizHawk.Client.EmuHawk/Program.cs index 9791baae1e..9e88a334da 100644 --- a/BizHawk.Client.EmuHawk/Program.cs +++ b/BizHawk.Client.EmuHawk/Program.cs @@ -126,7 +126,7 @@ namespace BizHawk.Client.EmuHawk // super hacky! this needs to be done first. still not worth the trouble to make this system fully proper if (Array.Exists(args, arg => arg.StartsWith("--gdi", StringComparison.InvariantCultureIgnoreCase))) { - Global.Config.DispMethod = Config.EDispMethod.GdiPlus; + Global.Config.DispMethod = EDispMethod.GdiPlus; } // create IGL context. we do this whether or not the user has selected OpenGL, so that we can run opengl-based emulator cores @@ -138,11 +138,11 @@ namespace BizHawk.Client.EmuHawk //now create the "GL" context for the display method. we can reuse the IGL_TK context if opengl display method is chosen REDO_DISPMETHOD: - if (Global.Config.DispMethod == Config.EDispMethod.GdiPlus) + if (Global.Config.DispMethod == EDispMethod.GdiPlus) { GlobalWin.GL = new Bizware.BizwareGL.Drivers.GdiPlus.IGL_GdiPlus(); } - else if (Global.Config.DispMethod == Config.EDispMethod.SlimDX9) + else if (Global.Config.DispMethod == EDispMethod.SlimDX9) { try { @@ -153,7 +153,7 @@ namespace BizHawk.Client.EmuHawk new ExceptionBox(new Exception("Initialization of Direct3d 9 Display Method failed; falling back to GDI+", ex)).ShowDialog(); // fallback - Global.Config.DispMethod = Config.EDispMethod.GdiPlus; + Global.Config.DispMethod = EDispMethod.GdiPlus; goto REDO_DISPMETHOD; } } @@ -165,7 +165,7 @@ namespace BizHawk.Client.EmuHawk if (GlobalWin.IGL_GL.Version < 200) { // fallback - Global.Config.DispMethod = Config.EDispMethod.GdiPlus; + Global.Config.DispMethod = EDispMethod.GdiPlus; goto REDO_DISPMETHOD; } } @@ -180,7 +180,7 @@ namespace BizHawk.Client.EmuHawk new ExceptionBox(new Exception("Initialization of Display Method failed; falling back to GDI+", ex)).ShowDialog(); //fallback - Global.Config.DispMethod = Config.EDispMethod.GdiPlus; + Global.Config.DispMethod = EDispMethod.GdiPlus; goto REDO_DISPMETHOD; } diff --git a/BizHawk.Client.EmuHawk/Sound/Sound.cs b/BizHawk.Client.EmuHawk/Sound/Sound.cs index 39839ca0cb..0c99b6e0f1 100644 --- a/BizHawk.Client.EmuHawk/Sound/Sound.cs +++ b/BizHawk.Client.EmuHawk/Sound/Sound.cs @@ -30,11 +30,11 @@ namespace BizHawk.Client.EmuHawk } else { - if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.OpenAL) + if (Global.Config.SoundOutputMethod == ESoundOutputMethod.OpenAL) _outputDevice = new OpenALSoundOutput(this); - if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.DirectSound) + if (Global.Config.SoundOutputMethod == ESoundOutputMethod.DirectSound) _outputDevice = new DirectSoundSoundOutput(this, mainWindowHandle, Global.Config.SoundDevice); - if (Global.Config.SoundOutputMethod == Config.ESoundOutputMethod.XAudio2) + if (Global.Config.SoundOutputMethod == ESoundOutputMethod.XAudio2) _outputDevice = new XAudio2SoundOutput(this); } diff --git a/BizHawk.Client.EmuHawk/config/DisplayConfig.cs b/BizHawk.Client.EmuHawk/config/DisplayConfig.cs index 73a7499dfc..4d37b1efa0 100644 --- a/BizHawk.Client.EmuHawk/config/DisplayConfig.cs +++ b/BizHawk.Client.EmuHawk/config/DisplayConfig.cs @@ -43,9 +43,9 @@ namespace BizHawk.Client.EmuHawk if (_config.DispSpeedupFeatures == 1) rbDisplayMinimal.Checked = true; if (_config.DispSpeedupFeatures == 0) rbDisplayAbsoluteZero.Checked = true; - rbOpenGL.Checked = _config.DispMethod == Config.EDispMethod.OpenGL; - rbGDIPlus.Checked = _config.DispMethod == Config.EDispMethod.GdiPlus; - rbD3D9.Checked = _config.DispMethod == Config.EDispMethod.SlimDX9; + rbOpenGL.Checked = _config.DispMethod == EDispMethod.OpenGL; + rbGDIPlus.Checked = _config.DispMethod == EDispMethod.GdiPlus; + rbD3D9.Checked = _config.DispMethod == EDispMethod.SlimDX9; cbStatusBarWindowed.Checked = _config.DispChrome_StatusBarWindowed; cbCaptionWindowed.Checked = _config.DispChrome_CaptionWindowed; @@ -60,13 +60,13 @@ namespace BizHawk.Client.EmuHawk nudPrescale.Value = _config.DispPrescale; - if (_config.DispManagerAR == Config.EDispManagerAR.None) + if (_config.DispManagerAR == EDispManagerAR.None) rbUseRaw.Checked = true; - else if (_config.DispManagerAR == Config.EDispManagerAR.System) + else if (_config.DispManagerAR == EDispManagerAR.System) rbUseSystem.Checked = true; - else if (_config.DispManagerAR == Config.EDispManagerAR.Custom) + else if (_config.DispManagerAR == EDispManagerAR.Custom) rbUseCustom.Checked = true; - else if (_config.DispManagerAR == Config.EDispManagerAR.CustomRatio) + else if (_config.DispManagerAR == EDispManagerAR.CustomRatio) rbUseCustomRatio.Checked = true; if(_config.DispCustomUserARWidth != -1) @@ -138,13 +138,13 @@ namespace BizHawk.Client.EmuHawk if (rbDisplayAbsoluteZero.Checked) _config.DispSpeedupFeatures = 0; if (rbUseRaw.Checked) - _config.DispManagerAR = Config.EDispManagerAR.None; + _config.DispManagerAR = EDispManagerAR.None; else if (rbUseSystem.Checked) - _config.DispManagerAR = Config.EDispManagerAR.System; + _config.DispManagerAR = EDispManagerAR.System; else if (rbUseCustom.Checked) - _config.DispManagerAR = Config.EDispManagerAR.Custom; + _config.DispManagerAR = EDispManagerAR.Custom; else if (rbUseCustomRatio.Checked) - _config.DispManagerAR = Config.EDispManagerAR.CustomRatio; + _config.DispManagerAR = EDispManagerAR.CustomRatio; if (txtCustomARWidth.Text != "") int.TryParse(txtCustomARWidth.Text, out _config.DispCustomUserARWidth); @@ -161,11 +161,11 @@ namespace BizHawk.Client.EmuHawk var oldDisplayMethod = _config.DispMethod; if(rbOpenGL.Checked) - _config.DispMethod = Config.EDispMethod.OpenGL; + _config.DispMethod = EDispMethod.OpenGL; if(rbGDIPlus.Checked) - _config.DispMethod = Config.EDispMethod.GdiPlus; + _config.DispMethod = EDispMethod.GdiPlus; if(rbD3D9.Checked) - _config.DispMethod = Config.EDispMethod.SlimDX9; + _config.DispMethod = EDispMethod.SlimDX9; int.TryParse(txtCropLeft.Text, out _config.DispCropLeft); int.TryParse(txtCropTop.Text, out _config.DispCropTop); diff --git a/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs b/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs index 2b3ef770a5..35b3673b3c 100644 --- a/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs +++ b/BizHawk.Client.EmuHawk/config/EmuHawkOptions.cs @@ -69,10 +69,10 @@ namespace BizHawk.Client.EmuHawk switch (_config.LuaEngine) { - case Config.ELuaEngine.LuaPlusLuaInterface: + case ELuaEngine.LuaPlusLuaInterface: LuaInterfaceRadio.Checked = true; break; - case Config.ELuaEngine.NLuaPlusKopiLua: + case ELuaEngine.NLuaPlusKopiLua: NLuaRadio.Checked = true; break; default: @@ -105,8 +105,8 @@ namespace BizHawk.Client.EmuHawk _config.MoviesInAWE = cbMoviesInAWE.Checked; var prevLuaEngine = _config.LuaEngine; - if (LuaInterfaceRadio.Checked) _config.LuaEngine = Config.ELuaEngine.LuaPlusLuaInterface; - else if (NLuaRadio.Checked) _config.LuaEngine = Config.ELuaEngine.NLuaPlusKopiLua; + if (LuaInterfaceRadio.Checked) _config.LuaEngine = ELuaEngine.LuaPlusLuaInterface; + else if (NLuaRadio.Checked) _config.LuaEngine = ELuaEngine.NLuaPlusKopiLua; Close(); DialogResult = DialogResult.OK; diff --git a/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs b/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs index 73406ca135..3e99ae8ded 100644 --- a/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs +++ b/BizHawk.Client.EmuHawk/config/PSX/PSXOptions.cs @@ -117,7 +117,7 @@ namespace BizHawk.Client.EmuHawk { if (_dispSettingsSet) { - _config.DispManagerAR = Config.EDispManagerAR.System; + _config.DispManagerAR = EDispManagerAR.System; _config.DispFixAspectRatio = true; _config.DispFixScaleInteger = false; _config.DispFinalFilter = 1; // bilinear, I hope diff --git a/BizHawk.Client.EmuHawk/config/ProfileConfig.cs b/BizHawk.Client.EmuHawk/config/ProfileConfig.cs index 0b1ba80cba..90cb8bc253 100644 --- a/BizHawk.Client.EmuHawk/config/ProfileConfig.cs +++ b/BizHawk.Client.EmuHawk/config/ProfileConfig.cs @@ -40,17 +40,17 @@ namespace BizHawk.Client.EmuHawk switch (_config.SelectedProfile) { default: - case Config.ClientProfile.Custom: // For now - case Config.ClientProfile.Casual: + case ClientProfile.Custom: // For now + case ClientProfile.Casual: ProfileSelectComboBox.SelectedItem = "Casual Gaming"; break; - case Config.ClientProfile.Longplay: + case ClientProfile.Longplay: ProfileSelectComboBox.SelectedItem = "Longplays"; break; - case Config.ClientProfile.Tas: + case ClientProfile.Tas: ProfileSelectComboBox.SelectedItem = "Tool-assisted Speedruns"; break; - case Config.ClientProfile.N64Tas: + case ClientProfile.N64Tas: ProfileSelectComboBox.SelectedItem = "N64 Tool-assisted Speedruns"; break; } @@ -65,20 +65,20 @@ namespace BizHawk.Client.EmuHawk default: case "Custom Profile": // For now case "Casual Gaming": - _config.SelectedProfile = Config.ClientProfile.Casual; + _config.SelectedProfile = ClientProfile.Casual; break; case "Longplays": - _config.SelectedProfile = Config.ClientProfile.Longplay; + _config.SelectedProfile = ClientProfile.Longplay; break; case "Tool-assisted Speedruns": - _config.SelectedProfile = Config.ClientProfile.Tas; + _config.SelectedProfile = ClientProfile.Tas; break; case "N64 Tool-assisted Speedruns": - _config.SelectedProfile = Config.ClientProfile.N64Tas; + _config.SelectedProfile = ClientProfile.N64Tas; break; } - if (_config.SelectedProfile == Config.ClientProfile.Casual) + if (_config.SelectedProfile == ClientProfile.Casual) { DisplayProfileSettingBoxes(false); _config.NoLowResLargeScreenshotWithStates = false; @@ -127,7 +127,7 @@ namespace BizHawk.Client.EmuHawk // NES _config.NES_InQuickNES = true; } - else if (_config.SelectedProfile == Config.ClientProfile.Longplay) + else if (_config.SelectedProfile == ClientProfile.Longplay) { DisplayProfileSettingBoxes(false); _config.NoLowResLargeScreenshotWithStates = false; @@ -175,7 +175,7 @@ namespace BizHawk.Client.EmuHawk // NES _config.NES_InQuickNES = true; } - else if (_config.SelectedProfile == Config.ClientProfile.Tas) + else if (_config.SelectedProfile == ClientProfile.Tas) { DisplayProfileSettingBoxes(false); @@ -226,7 +226,7 @@ namespace BizHawk.Client.EmuHawk // NES _config.NES_InQuickNES = true; } - else if (_config.SelectedProfile == Config.ClientProfile.N64Tas) + else if (_config.SelectedProfile == ClientProfile.N64Tas) { DisplayProfileSettingBoxes(false); @@ -278,7 +278,7 @@ namespace BizHawk.Client.EmuHawk // NES _config.NES_InQuickNES = true; } - else if (_config.SelectedProfile == Config.ClientProfile.Custom) + else if (_config.SelectedProfile == ClientProfile.Custom) { // Disabled for now ////DisplayProfileSettingBoxes(true); diff --git a/BizHawk.Client.EmuHawk/config/RewindConfig.cs b/BizHawk.Client.EmuHawk/config/RewindConfig.cs index dbcfa2bd4b..c5ef8d7d76 100644 --- a/BizHawk.Client.EmuHawk/config/RewindConfig.cs +++ b/BizHawk.Client.EmuHawk/config/RewindConfig.cs @@ -74,9 +74,9 @@ namespace BizHawk.Client.EmuHawk nudCompression.Value = _config.SaveStateCompressionLevelNormal; - rbStatesDefault.Checked = _config.SaveStateType == Config.SaveStateTypeE.Default; - rbStatesBinary.Checked = _config.SaveStateType == Config.SaveStateTypeE.Binary; - rbStatesText.Checked = _config.SaveStateType == Config.SaveStateTypeE.Text; + rbStatesDefault.Checked = _config.SaveStateType == SaveStateTypeE.Default; + rbStatesBinary.Checked = _config.SaveStateType == SaveStateTypeE.Binary; + rbStatesText.Checked = _config.SaveStateType == SaveStateTypeE.Text; BackupSavestatesCheckbox.Checked = _config.BackupSavestates; ScreenshotInStatesCheckbox.Checked = _config.SaveScreenshotWithStates; @@ -183,9 +183,9 @@ namespace BizHawk.Client.EmuHawk // These settings are not used by DoRewindSettings _config.RewindSpeedMultiplier = (int)RewindSpeedNumeric.Value; _config.SaveStateCompressionLevelNormal = (int)nudCompression.Value; - if (rbStatesDefault.Checked) _config.SaveStateType = Config.SaveStateTypeE.Default; - if (rbStatesBinary.Checked) _config.SaveStateType = Config.SaveStateTypeE.Binary; - if (rbStatesText.Checked) _config.SaveStateType = Config.SaveStateTypeE.Text; + if (rbStatesDefault.Checked) _config.SaveStateType = SaveStateTypeE.Default; + if (rbStatesBinary.Checked) _config.SaveStateType = SaveStateTypeE.Binary; + if (rbStatesText.Checked) _config.SaveStateType = SaveStateTypeE.Text; _config.BackupSavestates = BackupSavestatesCheckbox.Checked; _config.SaveScreenshotWithStates = ScreenshotInStatesCheckbox.Checked; _config.NoLowResLargeScreenshotWithStates = !LowResLargeScreenshotsCheckbox.Checked; diff --git a/BizHawk.Client.EmuHawk/config/SoundConfig.cs b/BizHawk.Client.EmuHawk/config/SoundConfig.cs index e8ba192668..bb8e62a204 100644 --- a/BizHawk.Client.EmuHawk/config/SoundConfig.cs +++ b/BizHawk.Client.EmuHawk/config/SoundConfig.cs @@ -35,9 +35,9 @@ namespace BizHawk.Client.EmuHawk rbOutputMethodXAudio2.Enabled = false; } - rbOutputMethodDirectSound.Checked = _config.SoundOutputMethod == Config.ESoundOutputMethod.DirectSound; - rbOutputMethodXAudio2.Checked = _config.SoundOutputMethod == Config.ESoundOutputMethod.XAudio2; - rbOutputMethodOpenAL.Checked = _config.SoundOutputMethod == Config.ESoundOutputMethod.OpenAL; + rbOutputMethodDirectSound.Checked = _config.SoundOutputMethod == ESoundOutputMethod.DirectSound; + rbOutputMethodXAudio2.Checked = _config.SoundOutputMethod == ESoundOutputMethod.XAudio2; + rbOutputMethodOpenAL.Checked = _config.SoundOutputMethod == ESoundOutputMethod.OpenAL; BufferSizeNumeric.Value = _config.SoundBufferSizeMs; tbNormal.Value = _config.SoundVolume; nudNormal.Value = _config.SoundVolume; @@ -61,9 +61,9 @@ namespace BizHawk.Client.EmuHawk _config.SoundEnabledNormal = cbEnableNormal.Checked; _config.SoundEnabledRWFF = cbEnableRWFF.Checked; _config.MuteFrameAdvance = cbMuteFrameAdvance.Checked; - if (rbOutputMethodDirectSound.Checked) _config.SoundOutputMethod = Config.ESoundOutputMethod.DirectSound; - if (rbOutputMethodXAudio2.Checked) _config.SoundOutputMethod = Config.ESoundOutputMethod.XAudio2; - if (rbOutputMethodOpenAL.Checked) _config.SoundOutputMethod = Config.ESoundOutputMethod.OpenAL; + if (rbOutputMethodDirectSound.Checked) _config.SoundOutputMethod = ESoundOutputMethod.DirectSound; + if (rbOutputMethodXAudio2.Checked) _config.SoundOutputMethod = ESoundOutputMethod.XAudio2; + if (rbOutputMethodOpenAL.Checked) _config.SoundOutputMethod = ESoundOutputMethod.OpenAL; _config.SoundBufferSizeMs = (int)BufferSizeNumeric.Value; _config.SoundVolume = tbNormal.Value; _config.SoundVolumeRWFF = tbRWFF.Value; diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings index df6986ead8..8e26f15d1c 100644 --- a/BizHawk.sln.DotSettings +++ b/BizHawk.sln.DotSettings @@ -66,7 +66,9 @@ False False AF + AL API + AR ARGB AV BG @@ -78,6 +80,7 @@ DC DGB DMG + DX GB GBA GBC @@ -286,6 +289,7 @@ True True True + True True True True