implement dirty checking for N64 settings
This commit is contained in:
parent
13584ceb62
commit
c68dd703dc
|
@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
{
|
||||
public N64Settings GetSettings()
|
||||
{
|
||||
return _settings.Clone();
|
||||
return _settings with { };
|
||||
}
|
||||
|
||||
public N64SyncSettings GetSyncSettings()
|
||||
|
@ -18,8 +18,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
|
||||
public PutSettingsDirtyBits PutSettings(N64Settings o)
|
||||
{
|
||||
bool changed = o != _settings;
|
||||
_settings = o;
|
||||
return PutSettingsDirtyBits.RebootCore;
|
||||
return changed ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
|
||||
}
|
||||
|
||||
public PutSettingsDirtyBits PutSyncSettings(N64SyncSettings o)
|
||||
|
|
|
@ -1,21 +1,10 @@
|
|||
namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||
{
|
||||
public class N64Settings
|
||||
public record N64Settings
|
||||
{
|
||||
public int VideoSizeX = 320;
|
||||
public int VideoSizeY = 240;
|
||||
|
||||
public bool UseMupenStyleLag { get; set; }
|
||||
|
||||
public N64Settings Clone()
|
||||
{
|
||||
return new N64Settings
|
||||
{
|
||||
VideoSizeX = VideoSizeX,
|
||||
VideoSizeY = VideoSizeY,
|
||||
|
||||
UseMupenStyleLag = UseMupenStyleLag
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue