Profile config - simplify logic by applying settings in layers. Also tweak a few settings for some of the profiles that were likely mistakes hard to see when there was so much copy pasta
This commit is contained in:
parent
5b2b72ce9e
commit
a9a85fccb9
|
@ -72,11 +72,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_config.SelectedProfile == ClientProfile.Casual)
|
SetCasual();
|
||||||
{
|
|
||||||
SetCasual();
|
if (_config.SelectedProfile == ClientProfile.Longplay)
|
||||||
}
|
|
||||||
else if (_config.SelectedProfile == ClientProfile.Longplay)
|
|
||||||
{
|
{
|
||||||
SetLongPlay();
|
SetLongPlay();
|
||||||
}
|
}
|
||||||
|
@ -86,6 +84,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else if (_config.SelectedProfile == ClientProfile.N64Tas)
|
else if (_config.SelectedProfile == ClientProfile.N64Tas)
|
||||||
{
|
{
|
||||||
|
SetTas();
|
||||||
SetN64Tas();
|
SetN64Tas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +140,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
// SMS
|
// SMS
|
||||||
var smsSettings = GetSyncSettings<SMS, SMS.SmsSyncSettings>();
|
var smsSettings = GetSyncSettings<SMS, SMS.SmsSyncSettings>();
|
||||||
smsSettings.UseBios = true;
|
smsSettings.UseBios = false;
|
||||||
PutSyncSettings<SMS>(smsSettings);
|
PutSyncSettings<SMS>(smsSettings);
|
||||||
|
|
||||||
// Coleco
|
// Coleco
|
||||||
|
@ -162,41 +161,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void SetLongPlay()
|
private void SetLongPlay()
|
||||||
{
|
{
|
||||||
_config.NoLowResLargeScreenshotWithStates = false;
|
|
||||||
_config.SaveScreenshotWithStates = false;
|
|
||||||
_config.AllowUdlr = false;
|
|
||||||
_config.BackupSavestates = false;
|
|
||||||
_config.SkipLagFrame = false;
|
|
||||||
_config.SaveStateCompressionLevelNormal = 5;
|
_config.SaveStateCompressionLevelNormal = 5;
|
||||||
|
|
||||||
_config.Rewind.EnabledLarge = false;
|
|
||||||
_config.Rewind.EnabledMedium = false;
|
|
||||||
_config.Rewind.EnabledSmall = true;
|
|
||||||
|
|
||||||
// N64
|
|
||||||
var n64Settings = GetSyncSettings<N64, N64SyncSettings>();
|
|
||||||
n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret;
|
|
||||||
_config.N64UseCircularAnalogConstraint = true;
|
|
||||||
PutSyncSettings<N64>(n64Settings);
|
|
||||||
|
|
||||||
// SNES
|
// SNES
|
||||||
_config.SnesInSnes9x = false;
|
_config.SnesInSnes9x = false;
|
||||||
|
|
||||||
// Genesis
|
|
||||||
var genesisSettings = GetSyncSettings<GPGX, GPGX.GPGXSyncSettings>();
|
|
||||||
genesisSettings.Region = LibGPGX.Region.Autodetect;
|
|
||||||
PutSyncSettings<GPGX>(genesisSettings);
|
|
||||||
|
|
||||||
// SMS
|
// SMS
|
||||||
var smsSettings = GetSyncSettings<SMS, SMS.SmsSyncSettings>();
|
var smsSettings = GetSyncSettings<SMS, SMS.SmsSyncSettings>();
|
||||||
smsSettings.UseBios = true;
|
smsSettings.UseBios = true;
|
||||||
PutSyncSettings<SMS>(smsSettings);
|
PutSyncSettings<SMS>(smsSettings);
|
||||||
|
|
||||||
// Coleco
|
|
||||||
var colecoSettings = GetSyncSettings<ColecoVision, ColecoVision.ColecoSyncSettings>();
|
|
||||||
colecoSettings.SkipBiosIntro = false;
|
|
||||||
PutSyncSettings<ColecoVision>(colecoSettings);
|
|
||||||
|
|
||||||
// A2600
|
// A2600
|
||||||
var a2600Settings = GetSyncSettings<Atari2600, Atari2600.A2600SyncSettings>();
|
var a2600Settings = GetSyncSettings<Atari2600, Atari2600.A2600SyncSettings>();
|
||||||
a2600Settings.FastScBios = false;
|
a2600Settings.FastScBios = false;
|
||||||
|
@ -205,13 +179,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
PutSyncSettings<Atari2600>(a2600Settings);
|
PutSyncSettings<Atari2600>(a2600Settings);
|
||||||
|
|
||||||
// NES
|
// NES
|
||||||
_config.NesInQuickNes = true;
|
_config.NesInQuickNes = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetTas()
|
private void SetTas()
|
||||||
{
|
{
|
||||||
// General
|
// General
|
||||||
_config.NoLowResLargeScreenshotWithStates = false;
|
|
||||||
_config.SaveScreenshotWithStates = true;
|
_config.SaveScreenshotWithStates = true;
|
||||||
_config.AllowUdlr = true;
|
_config.AllowUdlr = true;
|
||||||
_config.BackupSavestates = true;
|
_config.BackupSavestates = true;
|
||||||
|
@ -242,11 +215,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
smsSettings.UseBios = true;
|
smsSettings.UseBios = true;
|
||||||
PutSyncSettings<SMS>(smsSettings);
|
PutSyncSettings<SMS>(smsSettings);
|
||||||
|
|
||||||
// Coleco
|
|
||||||
var colecoSettings = GetSyncSettings<ColecoVision, ColecoVision.ColecoSyncSettings>();
|
|
||||||
colecoSettings.SkipBiosIntro = true;
|
|
||||||
PutSyncSettings<ColecoVision>(colecoSettings);
|
|
||||||
|
|
||||||
// A2600
|
// A2600
|
||||||
var a2600Settings = GetSyncSettings<Atari2600, Atari2600.A2600SyncSettings>();
|
var a2600Settings = GetSyncSettings<Atari2600, Atari2600.A2600SyncSettings>();
|
||||||
a2600Settings.FastScBios = false;
|
a2600Settings.FastScBios = false;
|
||||||
|
@ -255,58 +223,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
PutSyncSettings<Atari2600>(a2600Settings);
|
PutSyncSettings<Atari2600>(a2600Settings);
|
||||||
|
|
||||||
// NES
|
// NES
|
||||||
_config.NesInQuickNes = true;
|
_config.NesInQuickNes = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetN64Tas()
|
private void SetN64Tas()
|
||||||
{
|
{
|
||||||
// General
|
// General
|
||||||
_config.NoLowResLargeScreenshotWithStates = false;
|
|
||||||
_config.SaveScreenshotWithStates = true;
|
|
||||||
_config.AllowUdlr = true;
|
|
||||||
_config.BackupSavestates = false;
|
_config.BackupSavestates = false;
|
||||||
_config.SkipLagFrame = true;
|
_config.SkipLagFrame = true;
|
||||||
_config.SaveStateCompressionLevelNormal = 0;
|
_config.SaveStateCompressionLevelNormal = 0;
|
||||||
|
|
||||||
// Rewind
|
|
||||||
_config.Rewind.EnabledLarge = false;
|
|
||||||
_config.Rewind.EnabledMedium = false;
|
|
||||||
_config.Rewind.EnabledSmall = false;
|
|
||||||
|
|
||||||
// N64
|
|
||||||
var n64Settings = GetSyncSettings<N64, N64SyncSettings>();
|
|
||||||
n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Hle;
|
|
||||||
n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret;
|
|
||||||
_config.N64UseCircularAnalogConstraint = false;
|
|
||||||
PutSyncSettings<N64>(n64Settings);
|
|
||||||
|
|
||||||
// SNES
|
|
||||||
_config.SnesInSnes9x = false;
|
|
||||||
|
|
||||||
// Genesis
|
|
||||||
var genesisSettings = GetSyncSettings<GPGX, GPGX.GPGXSyncSettings>();
|
|
||||||
genesisSettings.Region = LibGPGX.Region.Autodetect;
|
|
||||||
PutSyncSettings<GPGX>(genesisSettings);
|
|
||||||
|
|
||||||
// SMS
|
|
||||||
var smsSettings = GetSyncSettings<SMS, SMS.SmsSyncSettings>();
|
|
||||||
smsSettings.UseBios = true;
|
|
||||||
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
|
|
||||||
_config.NesInQuickNes = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TSetting GetSyncSettings<TEmulator, TSetting>()
|
private TSetting GetSyncSettings<TEmulator, TSetting>()
|
||||||
|
|
Loading…
Reference in New Issue