2017-04-19 13:31:48 +00:00
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
|
|
|
|
{
|
|
|
|
|
public partial class LibsnesCore : ISettable<LibsnesCore.SnesSettings, LibsnesCore.SnesSyncSettings>
|
|
|
|
|
{
|
|
|
|
|
public SnesSettings GetSettings()
|
|
|
|
|
{
|
|
|
|
|
return _settings.Clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public SnesSyncSettings GetSyncSettings()
|
|
|
|
|
{
|
|
|
|
|
return _syncSettings.Clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool PutSettings(SnesSettings o)
|
|
|
|
|
{
|
|
|
|
|
bool refreshneeded = o.Palette != _settings.Palette;
|
|
|
|
|
_settings = o;
|
|
|
|
|
if (refreshneeded)
|
|
|
|
|
{
|
|
|
|
|
RefreshPalette();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool PutSyncSettings(SnesSyncSettings o)
|
|
|
|
|
{
|
|
|
|
|
bool ret = o.Profile != _syncSettings.Profile
|
|
|
|
|
|| o.LeftPort != _syncSettings.LeftPort
|
2017-04-20 01:30:42 +00:00
|
|
|
|
|| o.RightPort != _syncSettings.RightPort
|
2017-04-21 00:50:46 +00:00
|
|
|
|
|| o.LimitAnalogChangeSensitivity != _syncSettings.LimitAnalogChangeSensitivity;
|
2017-04-19 13:31:48 +00:00
|
|
|
|
|
|
|
|
|
_syncSettings = o;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private SnesSettings _settings;
|
|
|
|
|
private SnesSyncSettings _syncSettings;
|
|
|
|
|
|
|
|
|
|
public class SnesSettings
|
|
|
|
|
{
|
|
|
|
|
public bool ShowBG1_0 { get; set; } = true;
|
|
|
|
|
public bool ShowBG2_0 { get; set; } = true;
|
|
|
|
|
public bool ShowBG3_0 { get; set; } = true;
|
|
|
|
|
public bool ShowBG4_0 { get; set; } = true;
|
|
|
|
|
public bool ShowBG1_1 { get; set; } = true;
|
|
|
|
|
public bool ShowBG2_1 { get; set; } = true;
|
|
|
|
|
public bool ShowBG3_1 { get; set; } = true;
|
|
|
|
|
public bool ShowBG4_1 { get; set; } = true;
|
|
|
|
|
public bool ShowOBJ_0 { get; set; } = true;
|
|
|
|
|
public bool ShowOBJ_1 { get; set; } = true;
|
|
|
|
|
public bool ShowOBJ_2 { get; set; } = true;
|
|
|
|
|
public bool ShowOBJ_3 { get; set; } = true;
|
|
|
|
|
|
|
|
|
|
public bool AlwaysDoubleSize { get; set; } = false;
|
|
|
|
|
public bool ForceDeterminism { get; set; } = true;
|
|
|
|
|
public string Palette { get; set; } = "BizHawk";
|
|
|
|
|
|
|
|
|
|
public SnesSettings Clone()
|
|
|
|
|
{
|
|
|
|
|
return (SnesSettings)MemberwiseClone();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SnesSyncSettings
|
|
|
|
|
{
|
|
|
|
|
public string Profile { get; set; } = "Performance"; // "Accuracy", and "Compatibility" are the other choicec, todo: make this an enum
|
|
|
|
|
|
|
|
|
|
public LibsnesControllerDeck.ControllerType LeftPort { get; set; } = LibsnesControllerDeck.ControllerType.Gamepad;
|
|
|
|
|
public LibsnesControllerDeck.ControllerType RightPort { get; set; } = LibsnesControllerDeck.ControllerType.Gamepad;
|
|
|
|
|
|
2017-04-21 00:50:46 +00:00
|
|
|
|
public bool LimitAnalogChangeSensitivity { get; set; } = true;
|
2017-04-20 01:30:42 +00:00
|
|
|
|
|
2017-04-19 13:31:48 +00:00
|
|
|
|
public SnesSyncSettings Clone()
|
|
|
|
|
{
|
|
|
|
|
return (SnesSyncSettings)MemberwiseClone();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|