private void OkBtn_Click(object sender, EventArgs e) { switch (ProfileSelectComboBox.SelectedItem.ToString()) { default: case "Custom Profile": // For now case "Casual Gaming": _config.SelectedProfile = ClientProfile.Casual; break; case "Longplays": _config.SelectedProfile = ClientProfile.Longplay; break; case "Tool-assisted Speedruns": _config.SelectedProfile = ClientProfile.Tas; break; case "N64 Tool-assisted Speedruns": _config.SelectedProfile = ClientProfile.N64Tas; break; } SetCasual(); if (_config.SelectedProfile == ClientProfile.Longplay) { SetLongPlay(); } else if (_config.SelectedProfile == ClientProfile.Tas) { SetTas(); } else if (_config.SelectedProfile == ClientProfile.N64Tas) { SetTas(); SetN64Tas(); } bool oldUpdateAutoCheckEnabled = _config.UpdateAutoCheckEnabled; _config.UpdateAutoCheckEnabled = AutoCheckForUpdates.Checked; if (_config.UpdateAutoCheckEnabled != oldUpdateAutoCheckEnabled) { if (!_config.UpdateAutoCheckEnabled) { UpdateChecker.ResetHistory(); } UpdateChecker.BeginCheck(); // Call even if auto checking is disabled to trigger event (it won't actually check) } DialogResult = DialogResult.OK; Close(); }
private void OkBtn_Click(object sender, EventArgs e) { _config.SelectedProfile = ProfileSelectComboBox.SelectedItem.ToString() switch { "Longplays" => ClientProfile.Longplay, "Tool-assisted Speedruns" => ClientProfile.Tas, "N64 Tool-assisted Speedruns" => ClientProfile.N64Tas, _ => ClientProfile.Casual }; SetCasual(); switch (_config.SelectedProfile) { case ClientProfile.Longplay: SetLongPlay(); break; case ClientProfile.Tas: SetTas(); break; case ClientProfile.N64Tas: SetTas(); SetN64Tas(); break; } bool oldUpdateAutoCheckEnabled = _config.UpdateAutoCheckEnabled; _config.UpdateAutoCheckEnabled = AutoCheckForUpdates.Checked; if (_config.UpdateAutoCheckEnabled != oldUpdateAutoCheckEnabled) { UpdateChecker.GlobalConfig = _config; if (!_config.UpdateAutoCheckEnabled) { UpdateChecker.ResetHistory(); } UpdateChecker.BeginCheck(); // Call even if auto checking is disabled to trigger event (it won't actually check) } DialogResult = DialogResult.OK; Close(); }
private void OkBtn_Click(object sender, EventArgs e) { switch (ProfileSelectComboBox.SelectedItem.ToString()) { default: case "Custom Profile": // For now case "Casual Gaming": Global.Config.SelectedProfile = Config.ClientProfile.Casual; break; case "Longplays": Global.Config.SelectedProfile = Config.ClientProfile.Longplay; break; case "Tool-assisted Speedruns": Global.Config.SelectedProfile = Config.ClientProfile.Tas; break; case "N64 Tool-assisted Speedruns": Global.Config.SelectedProfile = Config.ClientProfile.N64Tas; break; } if (Global.Config.SelectedProfile == Config.ClientProfile.Casual) { DisplayProfileSettingBoxes(false); Global.Config.NoLowResLargeScreenshotWithStates = false; Global.Config.SaveScreenshotWithStates = false; Global.Config.AllowUD_LR = false; Global.Config.BackupSavestates = false; Global.Config.SaveStateCompressionLevelNormal = 0; Global.Config.RewindEnabledLarge = false; Global.Config.RewindEnabledMedium = false; Global.Config.RewindEnabledSmall = true; Global.Config.SkipLagFrame = false; // N64 var n64Settings = GetSyncSettings <N64, N64SyncSettings>(); n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Hle; n64Settings.Core = N64SyncSettings.CoreType.Dynarec; Global.Config.N64UseCircularAnalogConstraint = true; PutSyncSettings <N64>(n64Settings); // SNES var snesSettings = GetSyncSettings <LibsnesCore, LibsnesCore.SnesSyncSettings>(); snesSettings.Profile = "Performance"; PutSyncSettings <LibsnesCore>(snesSettings); //Saturn var saturnSettings = GetSyncSettings <Yabause, Yabause.SaturnSyncSettings>(); saturnSettings.SkipBios = false; PutSyncSettings <Yabause>(saturnSettings); //Genesis var genesisSettings = GetSyncSettings <GPGX, GPGX.GPGXSyncSettings>(); genesisSettings.Region = LibGPGX.Region.Autodetect; PutSyncSettings <GPGX>(genesisSettings); //SMS var smsSettings = GetSyncSettings <SMS, SMS.SMSSyncSettings>(); smsSettings.UseBIOS = false; PutSyncSettings <SMS>(smsSettings); //Coleco var colecoSettings = GetSyncSettings <ColecoVision, ColecoVision.ColecoSyncSettings>(); colecoSettings.SkipBiosIntro = false; PutSyncSettings <ColecoVision>(colecoSettings); //A2600 var a2600Settings = GetSyncSettings <Atari2600, Atari2600.A2600SyncSettings>(); a2600Settings.FastScBios = true; a2600Settings.LeftDifficulty = false; a2600Settings.RightDifficulty = false; PutSyncSettings <Atari2600>(a2600Settings); // NES Global.Config.NES_InQuickNES = true; } else if (Global.Config.SelectedProfile == Config.ClientProfile.Longplay) { DisplayProfileSettingBoxes(false); Global.Config.NoLowResLargeScreenshotWithStates = false; Global.Config.SaveScreenshotWithStates = false; Global.Config.AllowUD_LR = false; Global.Config.BackupSavestates = false; Global.Config.SkipLagFrame = false; Global.Config.SaveStateCompressionLevelNormal = 5; Global.Config.RewindEnabledLarge = false; Global.Config.RewindEnabledMedium = false; Global.Config.RewindEnabledSmall = true; // N64 var n64Settings = GetSyncSettings <N64, N64SyncSettings>(); n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Z64_hlevideo; n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret; Global.Config.N64UseCircularAnalogConstraint = true; PutSyncSettings <N64>(n64Settings); // SNES var snesSettings = GetSyncSettings <LibsnesCore, LibsnesCore.SnesSyncSettings>(); snesSettings.Profile = "Compatibility"; PutSyncSettings <LibsnesCore>(snesSettings); // Saturn var saturnSettings = GetSyncSettings <Yabause, Yabause.SaturnSyncSettings>(); saturnSettings.SkipBios = false; PutSyncSettings <Yabause>(saturnSettings); // Genesis var genesisSettings = GetSyncSettings <GPGX, GPGX.GPGXSyncSettings>(); genesisSettings.Region = LibGPGX.Region.Autodetect; PutSyncSettings <GPGX>(genesisSettings); // SMS var smsSettings = GetSyncSettings <SMS, SMS.SMSSyncSettings>(); smsSettings.UseBIOS = false; PutSyncSettings <SMS>(smsSettings); // Coleco var colecoSettings = GetSyncSettings <ColecoVision, ColecoVision.ColecoSyncSettings>(); colecoSettings.SkipBiosIntro = false; PutSyncSettings <ColecoVision>(colecoSettings); // A2600 var a2600Settings = GetSyncSettings <Atari2600, Atari2600.A2600SyncSettings>(); a2600Settings.FastScBios = false; a2600Settings.LeftDifficulty = true; a2600Settings.RightDifficulty = true; PutSyncSettings <Atari2600>(a2600Settings); // NES Global.Config.NES_InQuickNES = true; } else if (Global.Config.SelectedProfile == Config.ClientProfile.Tas) { DisplayProfileSettingBoxes(false); // General Global.Config.NoLowResLargeScreenshotWithStates = false; Global.Config.SaveScreenshotWithStates = true; Global.Config.AllowUD_LR = true; Global.Config.BackupSavestates = true; Global.Config.SkipLagFrame = false; Global.Config.SaveStateCompressionLevelNormal = 5; // Rewind Global.Config.RewindEnabledLarge = false; Global.Config.RewindEnabledMedium = false; Global.Config.RewindEnabledSmall = false; // N64 var n64Settings = GetSyncSettings <N64, N64SyncSettings>(); n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Z64_hlevideo; n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret; Global.Config.N64UseCircularAnalogConstraint = false; PutSyncSettings <N64>(n64Settings); // SNES var snesSettings = GetSyncSettings <LibsnesCore, LibsnesCore.SnesSyncSettings>(); snesSettings.Profile = "Compatibility"; PutSyncSettings <LibsnesCore>(snesSettings); // Saturn var saturnSettings = GetSyncSettings <Yabause, Yabause.SaturnSyncSettings>(); saturnSettings.SkipBios = true; PutSyncSettings <Yabause>(saturnSettings); // Genesis var genesisSettings = GetSyncSettings <GPGX, GPGX.GPGXSyncSettings>(); genesisSettings.Region = LibGPGX.Region.Autodetect; PutSyncSettings <GPGX>(genesisSettings); // SMS var smsSettings = GetSyncSettings <SMS, SMS.SMSSyncSettings>(); smsSettings.UseBIOS = false; PutSyncSettings <SMS>(smsSettings); // Coleco var colecoSettings = GetSyncSettings <ColecoVision, ColecoVision.ColecoSyncSettings>(); colecoSettings.SkipBiosIntro = true; PutSyncSettings <ColecoVision>(colecoSettings); // A2600 var a2600Settings = GetSyncSettings <Atari2600, Atari2600.A2600SyncSettings>(); a2600Settings.FastScBios = false; a2600Settings.LeftDifficulty = true; a2600Settings.RightDifficulty = true; PutSyncSettings <Atari2600>(a2600Settings); // NES Global.Config.NES_InQuickNES = true; } else if (Global.Config.SelectedProfile == Config.ClientProfile.N64Tas) { DisplayProfileSettingBoxes(false); // General Global.Config.NoLowResLargeScreenshotWithStates = false; Global.Config.SaveScreenshotWithStates = true; Global.Config.AllowUD_LR = true; Global.Config.BackupSavestates = false; Global.Config.SkipLagFrame = true; Global.Config.SaveStateCompressionLevelNormal = 0; // Rewind Global.Config.RewindEnabledLarge = false; Global.Config.RewindEnabledMedium = false; Global.Config.RewindEnabledSmall = false; // N64 var n64Settings = GetSyncSettings <N64, N64SyncSettings>(); n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Hle; n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret; Global.Config.N64UseCircularAnalogConstraint = false; PutSyncSettings <N64>(n64Settings); // SNES var snesSettings = GetSyncSettings <LibsnesCore, LibsnesCore.SnesSyncSettings>(); snesSettings.Profile = "Compatibility"; PutSyncSettings <LibsnesCore>(snesSettings); // Saturn var saturnSettings = GetSyncSettings <Yabause, Yabause.SaturnSyncSettings>(); saturnSettings.SkipBios = true; PutSyncSettings <Yabause>(saturnSettings); // Genesis var genesisSettings = GetSyncSettings <GPGX, GPGX.GPGXSyncSettings>(); genesisSettings.Region = LibGPGX.Region.Autodetect; PutSyncSettings <GPGX>(genesisSettings); // SMS var smsSettings = GetSyncSettings <SMS, SMS.SMSSyncSettings>(); smsSettings.UseBIOS = false; PutSyncSettings <SMS>(smsSettings); // Coleco var colecoSettings = GetSyncSettings <ColecoVision, ColecoVision.ColecoSyncSettings>(); colecoSettings.SkipBiosIntro = true; PutSyncSettings <ColecoVision>(colecoSettings); // A2600 var a2600Settings = GetSyncSettings <Atari2600, Atari2600.A2600SyncSettings>(); a2600Settings.FastScBios = false; a2600Settings.LeftDifficulty = true; a2600Settings.RightDifficulty = true; PutSyncSettings <Atari2600>(a2600Settings); // NES Global.Config.NES_InQuickNES = true; } else if (Global.Config.SelectedProfile == Config.ClientProfile.Custom) { //Disabled for now //DisplayProfileSettingBoxes(true); } bool oldUpdateAutoCheckEnabled = Global.Config.Update_AutoCheckEnabled; Global.Config.Update_AutoCheckEnabled = AutoCheckForUpdates.Checked; if (Global.Config.Update_AutoCheckEnabled != oldUpdateAutoCheckEnabled) { if (!Global.Config.Update_AutoCheckEnabled) { UpdateChecker.ResetHistory(); } UpdateChecker.BeginCheck(); // Call even if auto checking is disabled to trigger event (it won't actually check) } DialogResult = DialogResult.OK; Close(); }