diff --git a/BizHawk.Client.Common/Api/Classes/EmuApi.cs b/BizHawk.Client.Common/Api/Classes/EmuApi.cs
index 78c184e218..db551c2a42 100644
--- a/BizHawk.Client.Common/Api/Classes/EmuApi.cs
+++ b/BizHawk.Client.Common/Api/Classes/EmuApi.cs
@@ -195,7 +195,7 @@ namespace BizHawk.Client.Common
_ => (object) null
};
- public bool PutSettings(object settings) => Emulator switch
+ public PutSettingsDirtyBits PutSettings(object settings) => Emulator switch
{
GPGX gpgx => gpgx.PutSettings((GPGX.GPGXSettings) settings),
LibsnesCore snes => snes.PutSettings((LibsnesCore.SnesSettings) settings),
@@ -204,7 +204,7 @@ namespace BizHawk.Client.Common
QuickNES quickNes => quickNes.PutSettings((QuickNES.QuickNESSettings) settings),
SMS sms => sms.PutSettings((SMS.SmsSettings) settings),
WonderSwan ws => ws.PutSettings((WonderSwan.Settings) settings),
- _ => false
+ _ => PutSettingsDirtyBits.None
};
public void SetRenderPlanes(params bool[] args)
diff --git a/BizHawk.Client.Common/Api/Interfaces/IEmu.cs b/BizHawk.Client.Common/Api/Interfaces/IEmu.cs
index 7f84f92e28..e7f9a7b9dd 100644
--- a/BizHawk.Client.Common/Api/Interfaces/IEmu.cs
+++ b/BizHawk.Client.Common/Api/Interfaces/IEmu.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using BizHawk.Emulation.Common;
namespace BizHawk.Client.Common
{
@@ -26,7 +27,7 @@ namespace BizHawk.Client.Common
string GetDisplayType();
string GetBoardName();
object GetSettings();
- bool PutSettings(object settings);
+ PutSettingsDirtyBits PutSettings(object settings);
void SetRenderPlanes(params bool[] args);
}
}
diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs
index a2e2207701..1c732011b6 100644
--- a/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.cs
@@ -2305,10 +2305,11 @@ namespace BizHawk.Client.EmuHawk
public void PutCoreSettings(object o)
{
var settable = new SettingsAdapter(Emulator);
- if (settable.HasSettings && settable.PutSettings(o))
- {
+ if (!settable.HasSettings)
+ return;
+ var dirty = settable.PutSettings(o);
+ if(dirty.HasFlag(PutSettingsDirtyBits.RebootCore))
FlagNeedsReboot();
- }
}
// TODO: Get/Put settings/sync settings methods could become a service we instantiate and use and pass to other forms
@@ -2322,9 +2323,13 @@ namespace BizHawk.Client.EmuHawk
{
AddOnScreenMessage("Attempt to change sync-relevant settings while recording BLOCKED.");
}
- else if (settable.HasSyncSettings && settable.PutSyncSettings(o))
+ else
{
- FlagNeedsReboot();
+ if (!settable.HasSyncSettings)
+ return;
+ var dirty = settable.PutSyncSettings(o);
+ if(dirty.HasFlag(PutSettingsDirtyBits.RebootCore))
+ FlagNeedsReboot();
}
}
diff --git a/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs b/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs
index 661777b102..1233be0fc6 100644
--- a/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs
+++ b/BizHawk.Emulation.Common/Interfaces/Services/ISettable.cs
@@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Common
///
/// an object of the same type as the return for GetSettings
/// true if a core reboot will be required to make the changes effective
- bool PutSettings(TSettings o);
+ PutSettingsDirtyBits PutSettings(TSettings o);
///
/// changes the movie-sync relevant settings. THIS SHOULD NEVER BE CALLED WHILE RECORDING
@@ -49,7 +49,19 @@ namespace BizHawk.Emulation.Common
///
/// an object of the same type as the return for GetSyncSettings
/// true if a core reboot will be required to make the changes effective
- bool PutSyncSettings(TSync o);
+ PutSettingsDirtyBits PutSyncSettings(TSync o);
+ }
+
+ //note: this is a bit of a frail API. If a frontend wants a new flag, cores won't know to yea or nay it
+ //this could be solved by adding a KnownSettingsDirtyBits on the settings interface
+ //or, in a pinch, the same thing could be done with THESE flags, so that the interface doesn't
+ //change but newly-aware cores can simply manifest that they know about more bits, in the same variable they return the bits in
+ [Flags]
+ public enum PutSettingsDirtyBits
+ {
+ None = 0,
+ RebootCore = 1,
+ ScreenLayoutChanged = 2,
}
///
@@ -126,7 +138,7 @@ namespace BizHawk.Emulation.Common
}
/// does not have non-sync settings
- public bool PutSettings(object o)
+ public PutSettingsDirtyBits PutSettings(object o)
{
if (!HasSettings)
{
@@ -134,11 +146,11 @@ namespace BizHawk.Emulation.Common
}
_tmp1[0] = o;
- return (bool)_puts.Invoke(_emu, _tmp1);
+ return (PutSettingsDirtyBits)_puts.Invoke(_emu, _tmp1);
}
/// does not have sync settings
- public bool PutSyncSettings(object o)
+ public PutSettingsDirtyBits PutSyncSettings(object o)
{
if (!HasSyncSettings)
{
@@ -146,7 +158,7 @@ namespace BizHawk.Emulation.Common
}
_tmp1[0] = o;
- return (bool)_putss.Invoke(_emu, _tmp1);
+ return (PutSettingsDirtyBits)_putss.Invoke(_emu, _tmp1);
}
}
}
diff --git a/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs
index a5069292a4..3fbdbca5f4 100644
--- a/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs
+++ b/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs
@@ -257,18 +257,18 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
#region ISettable
public object GetSettings() => null;
- public bool PutSettings(object o) => false;
+ public PutSettingsDirtyBits PutSettings(object o) => PutSettingsDirtyBits.None;
public SyncSettings GetSyncSettings()
{
return _syncSettings.Clone();
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
bool ret = SyncSettings.NeedsReboot(o, _syncSettings);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public class SyncSettings
diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.ISettable.cs b/BizHawk.Emulation.Cores/Calculator/TI83.ISettable.cs
index c637365861..31389c24dc 100644
--- a/BizHawk.Emulation.Cores/Calculator/TI83.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Calculator/TI83.ISettable.cs
@@ -11,10 +11,10 @@ namespace BizHawk.Emulation.Cores.Calculators
return _settings.Clone();
}
- public bool PutSettings(TI83Settings o)
+ public PutSettingsDirtyBits PutSettings(TI83Settings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
public object GetSyncSettings()
@@ -22,9 +22,9 @@ namespace BizHawk.Emulation.Cores.Calculators
return null;
}
- public bool PutSyncSettings(object o)
+ public PutSettingsDirtyBits PutSyncSettings(object o)
{
- return false;
+ return PutSettingsDirtyBits.None;
}
public class TI83Settings
diff --git a/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.ISettable.cs b/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.ISettable.cs
index 158d087582..8f7074640b 100644
--- a/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.ISettable.cs
@@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
return SyncSettings.Clone();
}
- public bool PutSettings(AmstradCPCSettings o)
+ public PutSettingsDirtyBits PutSettings(AmstradCPCSettings o)
{
// restore user settings to devices
@@ -42,14 +42,14 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
Settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(AmstradCPCSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(AmstradCPCSyncSettings o)
{
bool ret = AmstradCPCSyncSettings.NeedsReboot(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public class AmstradCPCSettings
diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISettable.cs b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISettable.cs
index 571acaaa9c..f51a4a1ff7 100644
--- a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.ISettable.cs
@@ -20,16 +20,16 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
public object GetSyncSettings() => null;
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
_settings = o;
_machine.Video.IsMonochrome = _settings.Monochrome;
SetCallbacks();
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(object o) => false;
+ public PutSettingsDirtyBits PutSyncSettings(object o) => PutSettingsDirtyBits.None;
}
}
diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.ISettable.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.ISettable.cs
index c62b885bbd..4c9342c848 100644
--- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.ISettable.cs
@@ -16,16 +16,16 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
return SyncSettings.Clone();
}
- public bool PutSettings(C64Settings o)
+ public PutSettingsDirtyBits PutSettings(C64Settings o)
{
Settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(C64SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(C64SyncSettings o)
{
SyncSettings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
internal C64Settings Settings { get; private set; }
diff --git a/BizHawk.Emulation.Cores/Computers/MSX/MSX.ISettable.cs b/BizHawk.Emulation.Cores/Computers/MSX/MSX.ISettable.cs
index b6931bf390..f34c771bff 100644
--- a/BizHawk.Emulation.Cores/Computers/MSX/MSX.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Computers/MSX/MSX.ISettable.cs
@@ -16,18 +16,18 @@ namespace BizHawk.Emulation.Cores.Computers.MSX
return SyncSettings.Clone();
}
- public bool PutSettings(MSXSettings o)
+ public PutSettingsDirtyBits PutSettings(MSXSettings o)
{
bool ret = MSXSettings.RebootNeeded(Settings, o);
Settings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(MSXSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(MSXSyncSettings o)
{
bool ret = MSXSyncSettings.RebootNeeded(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
internal MSXSettings Settings { get; private set; }
diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs
index 4d6e87f082..d492fce33a 100644
--- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.ISettable.cs
@@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
public ZXSpectrumSyncSettings GetSyncSettings() => SyncSettings.Clone();
- public bool PutSettings(ZXSpectrumSettings o)
+ public PutSettingsDirtyBits PutSettings(ZXSpectrumSettings o)
{
// restore user settings to devices
if (_machine?.AYDevice != null)
@@ -39,14 +39,14 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
Settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(ZXSpectrumSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(ZXSpectrumSyncSettings o)
{
bool ret = ZXSpectrumSyncSettings.NeedsReboot(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public class ZXSpectrumSettings
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.ISettable.cs
index c1f6aa0011..73d1425071 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.ISettable.cs
@@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
return SyncSettings.Clone();
}
- public bool PutSettings(A2600Settings o)
+ public PutSettingsDirtyBits PutSettings(A2600Settings o)
{
if (Settings == null || Settings.SECAMColors != o.SECAMColors)
{
@@ -29,14 +29,14 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
}
Settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(A2600SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(A2600SyncSettings o)
{
bool ret = A2600SyncSettings.NeedsReboot(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
internal A2600Settings Settings { get; private set; }
diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs
index bca6127077..311c533cd8 100644
--- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs
@@ -18,17 +18,17 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
return _syncSettings.Clone();
}
- public bool PutSettings(A7800Settings o)
+ public PutSettingsDirtyBits PutSettings(A7800Settings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(A7800SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(A7800SyncSettings o)
{
bool ret = A7800SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private A7800Settings _settings = new A7800Settings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISettable.cs
index 40620efbba..1ba06ed945 100644
--- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISettable.cs
@@ -18,18 +18,18 @@ namespace BizHawk.Emulation.Cores.ColecoVision
return _syncSettings.Clone();
}
- public bool PutSettings(ColecoSettings o)
+ public PutSettingsDirtyBits PutSettings(ColecoSettings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(ColecoSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(ColecoSyncSettings o)
{
bool ret = o.SkipBiosIntro != _syncSettings.SkipBiosIntro;
ret |= ColecoSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public class ColecoSettings
diff --git a/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.ISettable.cs
index fe454f84b9..47f3cdc1a9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Fairchild/ChannelF/ChannelF.ISettable.cs
@@ -19,17 +19,17 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF
return SyncSettings.Clone();
}
- public bool PutSettings(ChannelFSettings o)
+ public PutSettingsDirtyBits PutSettings(ChannelFSettings o)
{
Settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(ChannelFSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(ChannelFSyncSettings o)
{
bool ret = ChannelFSyncSettings.NeedsReboot(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public class ChannelFSettings
diff --git a/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs
index 0c9765633d..57cb70c9fe 100644
--- a/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs
@@ -19,17 +19,17 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
return _syncSettings.Clone();
}
- public bool PutSettings(VectrexSettings o)
+ public PutSettingsDirtyBits PutSettings(VectrexSettings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(VectrexSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(VectrexSyncSettings o)
{
bool ret = VectrexSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private VectrexSettings _settings = new VectrexSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.ISettable.cs
index 6174512b7f..ca93fa33f9 100644
--- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.ISettable.cs
@@ -18,17 +18,17 @@ namespace BizHawk.Emulation.Cores.Intellivision
return _syncSettings.Clone();
}
- public bool PutSettings(IntvSettings o)
+ public PutSettingsDirtyBits PutSettings(IntvSettings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(IntvSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(IntvSyncSettings o)
{
bool ret = IntvSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private IntvSettings _settings = new IntvSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs
index 735a0c75d9..7973a5d79b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.ISettable.cs
@@ -16,17 +16,17 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
return _syncSettings.Clone();
}
- public bool PutSettings(O2Settings o)
+ public PutSettingsDirtyBits PutSettings(O2Settings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(O2SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(O2SyncSettings o)
{
bool ret = O2SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public O2Settings _settings = new O2Settings();
diff --git a/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs b/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs
index 82deaf9a92..bd70effce1 100644
--- a/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs
+++ b/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs
@@ -330,19 +330,19 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCFX
return _syncSettings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
var ret = Settings.NeedsReboot(_settings, o);
_settings = o;
SetLayerSettings();
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private void SetNativeSettingsBeforeInit()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISettable.cs
index 4ae7bb545c..99e981a192 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.ISettable.cs
@@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
return _settings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
LibmGBA.Layers mask = 0;
if (o.DisplayBG0) mask |= LibmGBA.Layers.BG0;
@@ -51,7 +51,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
LibmGBA.BizSetPalette(Core, palette);
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
private Settings _settings;
@@ -139,11 +139,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
return _syncSettings.Clone();
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
bool ret = SyncSettings.NeedsReboot(o, _syncSettings);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private SyncSettings _syncSettings;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISettings.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISettings.cs
index 6888588004..4e6c6b4065 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISettings.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.ISettings.cs
@@ -18,16 +18,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
return _syncSettings.Clone();
}
- public bool PutSettings(object o)
+ public PutSettingsDirtyBits PutSettings(object o)
{
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
bool ret = SyncSettings.NeedsReboot(o, _syncSettings);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private SyncSettings _syncSettings;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs
index f254ffcc2c..0d5672456f 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs
@@ -20,17 +20,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
return _syncSettings.Clone();
}
- public bool PutSettings(GBSettings o)
+ public PutSettingsDirtyBits PutSettings(GBSettings o)
{
_settings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(GBSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GBSyncSettings o)
{
bool ret = GBSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private GBSettings _settings = new GBSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs
index bfad7981b0..ffa88f5e37 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs
@@ -14,17 +14,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink
public GBLinkSyncSettings GetSyncSettings() => linkSyncSettings.Clone();
- public bool PutSettings(GBLinkSettings o)
+ public PutSettingsDirtyBits PutSettings(GBLinkSettings o)
{
linkSettings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(GBLinkSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GBLinkSyncSettings o)
{
bool ret = GBLinkSyncSettings.NeedsReboot(linkSyncSettings, o);
linkSyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private GBLinkSettings linkSettings = new GBLinkSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs
index 7eda62e97e..de669c91f0 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs
@@ -14,17 +14,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x
public GBLink3xSyncSettings GetSyncSettings() => Link3xSyncSettings.Clone();
- public bool PutSettings(GBLink3xSettings o)
+ public PutSettingsDirtyBits PutSettings(GBLink3xSettings o)
{
Link3xSettings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(GBLink3xSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GBLink3xSyncSettings o)
{
bool ret = GBLink3xSyncSettings.NeedsReboot(Link3xSyncSettings, o);
Link3xSyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private GBLink3xSettings Link3xSettings = new GBLink3xSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs
index ea7bb4c9a4..f231564eec 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs
@@ -14,17 +14,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x
public GBLink4xSyncSettings GetSyncSettings() => Link4xSyncSettings.Clone();
- public bool PutSettings(GBLink4xSettings o)
+ public PutSettingsDirtyBits PutSettings(GBLink4xSettings o)
{
Link4xSettings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(GBLink4xSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GBLink4xSyncSettings o)
{
bool ret = GBLink4xSyncSettings.NeedsReboot(Link4xSyncSettings, o);
Link4xSyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private GBLink4xSettings Link4xSettings = new GBLink4xSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs
index 3e4df88d3e..b53cf1536f 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs
@@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
return _settings.Clone();
}
- public bool PutSettings(GambatteSettings o)
+ public PutSettingsDirtyBits PutSettings(GambatteSettings o)
{
_settings = o;
if (IsCGBMode())
@@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
ChangeDMGColors(_settings.GBPalette);
}
- return false;
+ return PutSettingsDirtyBits.None;
}
public GambatteSyncSettings GetSyncSettings()
@@ -34,11 +34,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
return _syncSettings.Clone();
}
- public bool PutSyncSettings(GambatteSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GambatteSyncSettings o)
{
bool ret = GambatteSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private GambatteSettings _settings;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISettable.cs
index 7249a7630d..544b748ad1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISettable.cs
@@ -21,14 +21,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
);
}
- public bool PutSettings(GambatteLinkSettings o)
+ public PutSettingsDirtyBits PutSettings(GambatteLinkSettings o)
{
- return L.PutSettings(o.L) || R.PutSettings(o.R);
+ return (PutSettingsDirtyBits)((int)L.PutSettings(o.L) | (int)R.PutSettings(o.R));
}
- public bool PutSyncSettings(GambatteLinkSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GambatteLinkSyncSettings o)
{
- return L.PutSyncSettings(o.L) || R.PutSyncSettings(o.R);
+ return (PutSettingsDirtyBits)((int)L.PutSyncSettings(o.L) | (int)R.PutSyncSettings(o.R));
}
public class GambatteLinkSettings
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs
index 4f44eb5205..84032cef72 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Sameboy.cs
@@ -245,18 +245,18 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy
return _syncSettings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
var ret = Settings.NeedsReboot(_settings, o);
_settings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ISettable.cs
index 016749ae89..a1aefe2773 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.ISettable.cs
@@ -14,17 +14,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
return _syncSettings.Clone();
}
- public bool PutSettings(N64Settings o)
+ public PutSettingsDirtyBits PutSettings(N64Settings o)
{
_settings = o;
- return true;
+ return PutSettingsDirtyBits.RebootCore;
}
- public bool PutSyncSettings(N64SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(N64SyncSettings o)
{
_syncSettings = o;
SetControllerButtons();
- return true;
+ return PutSettingsDirtyBits.RebootCore;
}
private void SetControllerButtons()
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_Settable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_Settable.cs
index 4cdf72a58b..e86f858969 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_Settable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_Settable.cs
@@ -30,14 +30,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
return ret;
}
- public bool PutSettings(MelonSettings o)
+ public PutSettingsDirtyBits PutSettings(MelonSettings o)
{
_settings = o ?? new MelonSettings();
SetScaleFactor(_settings.ScaleFactor);
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(MelonSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(MelonSyncSettings o)
{
if (o == null)
{
@@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
SetTimeAtBoot(o.TimeAtBoot);
// At present, no sync settings can be modified without requiring a reboot.
- return true;
+ return PutSettingsDirtyBits.RebootCore;
}
[DllImport(dllPath)]
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs
index da4036ab5f..937f39b590 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.ISettable.cs
@@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public NESSyncSettings GetSyncSettings() => SyncSettings.Clone();
- public bool PutSettings(NESSettings o)
+ public PutSettingsDirtyBits PutSettings(NESSettings o)
{
Settings = o;
if (Settings.ClipLeftAndRight)
@@ -30,14 +30,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
apu.m_vol = Settings.APU_vol;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(NESSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(NESSyncSettings o)
{
bool ret = NESSyncSettings.NeedsReboot(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
internal NESSettings Settings = new NESSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.ISettable.cs
index 2d76097f42..62d126ff6d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.ISettable.cs
@@ -21,21 +21,21 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
return _syncSettingsNext.Clone();
}
- public bool PutSettings(QuickNESSettings o)
+ public PutSettingsDirtyBits PutSettings(QuickNESSettings o)
{
_settings = o;
QN.qn_set_sprite_limit(Context, _settings.NumSprites);
RecalculateCrops();
CalculatePalette();
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(QuickNESSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(QuickNESSyncSettings o)
{
bool ret = QuickNESSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettingsNext = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private QuickNESSettings _settings;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ISettable.cs
index 983e124d70..0d9b54d742 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.ISettable.cs
@@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
return _syncSettings.Clone();
}
- public bool PutSettings(SnesSettings o)
+ public PutSettingsDirtyBits PutSettings(SnesSettings o)
{
bool refreshNeeded = o.Palette != _settings.Palette;
_settings = o;
@@ -23,17 +23,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
RefreshPalette();
}
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SnesSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SnesSyncSettings o)
{
bool ret = o.LeftPort != _syncSettings.LeftPort
|| o.RightPort != _syncSettings.RightPort
|| o.LimitAnalogChangeSensitivity != _syncSettings.LimitAnalogChangeSensitivity;
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private SnesSettings _settings;
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs
index a7adf6cdc5..0b4e1da29b 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs
@@ -308,7 +308,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
return _syncSettings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
_settings = o;
int s = 0;
@@ -334,14 +334,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
if (o.ShowSprites3) l |= 2048;
_core.biz_set_layers(l);
- return false; // no reboot needed
+ return PutSettingsDirtyBits.None; // no reboot needed
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public class Settings
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs
index 94617ad8dd..7b53953af1 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SubGBHawk/SubGBHawk.cs
@@ -58,7 +58,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubGBHawk
public GBHawk.GBHawk.GBSettings GetSettings() => _GBCore.GetSettings();
public GBHawk.GBHawk.GBSyncSettings GetSyncSettings() => _GBCore.GetSyncSettings();
- public bool PutSettings(GBHawk.GBHawk.GBSettings o) => _GBCore.PutSettings(o);
- public bool PutSyncSettings(GBHawk.GBHawk.GBSyncSettings o) => _GBCore.PutSyncSettings(o);
+ public PutSettingsDirtyBits PutSettings(GBHawk.GBHawk.GBSettings o) => _GBCore.PutSettings(o);
+ public PutSettingsDirtyBits PutSyncSettings(GBHawk.GBHawk.GBSyncSettings o) => _GBCore.PutSyncSettings(o);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs
index 73e26b42e8..089ac8b80f 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SubNESHawk/SubNESHawk.cs
@@ -84,7 +84,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SubNESHawk
public NES.NES.NESSettings GetSettings() => _nesCore.GetSettings();
public NES.NES.NESSyncSettings GetSyncSettings() => _nesCore.GetSyncSettings();
- public bool PutSettings(NES.NES.NESSettings o) => _nesCore.PutSettings(o);
- public bool PutSyncSettings(NES.NES.NESSyncSettings o) => _nesCore.PutSyncSettings(o);
+ public PutSettingsDirtyBits PutSettings(NES.NES.NESSettings o) => _nesCore.PutSettings(o);
+ public PutSettingsDirtyBits PutSyncSettings(NES.NES.NESSyncSettings o) => _nesCore.PutSyncSettings(o);
}
}
diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs
index 9001fa4384..d46aea200a 100644
--- a/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/VB/VirtualBoyee.cs
@@ -234,18 +234,18 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.VB
return _syncSettings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
var ret = Settings.NeedsReboot(_settings, o);
_settings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ISettable.cs
index 38b0d9151b..a4bcdbf504 100644
--- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.ISettable.cs
@@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
return _syncSettings.Clone();
}
- public bool PutSettings(PCESettings o)
+ public PutSettingsDirtyBits PutSettings(PCESettings o)
{
bool ret;
if (o.ArcadeCardRewindHack != Settings.ArcadeCardRewindHack
@@ -32,14 +32,14 @@ namespace BizHawk.Emulation.Cores.PCEngine
Settings = o;
- return ret;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(PCESyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(PCESyncSettings o)
{
bool ret = PCESyncSettings.NeedsReboot(o, _syncSettings);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public PCESettings Settings;
diff --git a/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs b/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs
index 731045a3d5..a1a3b5e11d 100644
--- a/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs
+++ b/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs
@@ -166,16 +166,16 @@ namespace BizHawk.Emulation.Cores.Consoles.SNK
return _syncSettings.Clone();
}
- public bool PutSettings(object o)
+ public PutSettingsDirtyBits PutSettings(object o)
{
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ISettable.cs
index bdf7c5c1ef..628541c13d 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/GGHawkLink/GGHawkLink.ISettable.cs
@@ -16,17 +16,17 @@ namespace BizHawk.Emulation.Cores.Sega.GGHawkLink
return linkSyncSettings.Clone();
}
- public bool PutSettings(GGLinkSettings o)
+ public PutSettingsDirtyBits PutSettings(GGLinkSettings o)
{
linkSettings = o;
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(GGLinkSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GGLinkSyncSettings o)
{
bool ret = GGLinkSyncSettings.NeedsReboot(linkSyncSettings, o);
linkSyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private GGLinkSettings linkSettings = new GGLinkSettings();
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs b/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs
index 71c100e7b6..8f94c6c788 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/PicoDrive/PicoDrive.cs
@@ -229,16 +229,16 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
return _syncSettings.Clone();
}
- public bool PutSettings(object o)
+ public PutSettingsDirtyBits PutSettings(object o)
{
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ISettable.cs
index cc9dfefda0..23ccfc5a36 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.ISettable.cs
@@ -9,18 +9,18 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
public SmsSyncSettings GetSyncSettings() => SyncSettings.Clone();
- public bool PutSettings(SmsSettings o)
+ public PutSettingsDirtyBits PutSettings(SmsSettings o)
{
bool ret = SmsSettings.RebootNeeded(Settings, o);
Settings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SmsSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SmsSyncSettings o)
{
bool ret = SmsSyncSettings.RebootNeeded(SyncSettings, o);
SyncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
internal SmsSettings Settings { get; private set; }
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs
index 39d8305bbc..40e7a9f9b2 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs
@@ -439,7 +439,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn
return _settings.Clone();
}
- public bool PutSettings(Settings s)
+ public PutSettingsDirtyBits PutSettings(Settings s)
{
var ret = Settings.NeedsReboot(_settings, s);
_settings = s;
@@ -449,7 +449,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn
//(the correct aspect ratio is no longer an option for other reasons)
//_core.SetVideoParameters(s.CorrectAspectRatio, s.HBlend, s.HOverscan, sls, sle);
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
public SyncSettings GetSyncSettings()
@@ -457,11 +457,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn
return _syncSettings.Clone();
}
- public bool PutSyncSettings(SyncSettings s)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings s)
{
var ret = SyncSettings.NeedsReboot(_syncSettings, s);
_syncSettings = s;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private void SetVideoParameters()
diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs
index 71ca6ff947..b513bed2fd 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.ISettable.cs
@@ -21,19 +21,19 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
return _syncSettings.Clone();
}
- public bool PutSettings(GPGXSettings o)
+ public PutSettingsDirtyBits PutSettings(GPGXSettings o)
{
bool ret = GPGXSettings.NeedsReboot(_settings, o);
_settings = o;
Core.gpgx_set_draw_mask(_settings.GetDrawMask());
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(GPGXSyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(GPGXSyncSettings o)
{
bool ret = GPGXSyncSettings.NeedsReboot(_syncSettings, o);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
private class UintToHexConverter : TypeConverter
diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
index 7f4f0b3f63..dcd3174462 100644
--- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
+++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs
@@ -1271,17 +1271,17 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
return _SyncSettings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
_Settings.Validate();
_Settings = o;
//TODO - store settings into core? or we can just keep doing it before frameadvance
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
//currently LEC and pad settings changes both require reboot
bool reboot = true;
@@ -1293,7 +1293,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
_SyncSettings = o;
- return reboot;
+ return reboot ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
#endregion
diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs
index 7cc53f3842..1a7a240c55 100644
--- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs
+++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.ISettable.cs
@@ -158,19 +158,19 @@ namespace BizHawk.Emulation.Cores.WonderSwan
public SyncSettings GetSyncSettings() => _syncSettings.Clone();
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
_settings = o;
var native = _settings.GetNativeSettings();
BizSwan.bizswan_putsettings(Core, ref native);
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
bool ret = SyncSettings.NeedsReboot(o, _syncSettings);
_syncSettings = o;
- return ret;
+ return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
}
diff --git a/BizHawk.Emulation.Cores/Libretro/LibretroCoreSettings.cs b/BizHawk.Emulation.Cores/Libretro/LibretroCoreSettings.cs
index d46bfd8e48..3e874fbbcf 100644
--- a/BizHawk.Emulation.Cores/Libretro/LibretroCoreSettings.cs
+++ b/BizHawk.Emulation.Cores/Libretro/LibretroCoreSettings.cs
@@ -1,5 +1,6 @@
using Newtonsoft.Json;
using BizHawk.Common;
+using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Libretro
{
@@ -49,17 +50,17 @@ namespace BizHawk.Emulation.Cores.Libretro
return _SyncSettings.Clone();
}
- public bool PutSettings(Settings o)
+ public PutSettingsDirtyBits PutSettings(Settings o)
{
_Settings.Validate();
_Settings = o;
//TODO - store settings into core? or we can just keep doing it before frameadvance
- return false;
+ return PutSettingsDirtyBits.None;
}
- public bool PutSyncSettings(SyncSettings o)
+ public PutSettingsDirtyBits PutSyncSettings(SyncSettings o)
{
bool reboot = false;
@@ -68,7 +69,7 @@ namespace BizHawk.Emulation.Cores.Libretro
_SyncSettings = o;
- return reboot;
+ return reboot ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
}