diff --git a/BizHawk.Client.EmuHawk/IControlMainform.cs b/BizHawk.Client.EmuHawk/IControlMainform.cs
index 4579ee8a0b..792dd83da3 100644
--- a/BizHawk.Client.EmuHawk/IControlMainform.cs
+++ b/BizHawk.Client.EmuHawk/IControlMainform.cs
@@ -10,9 +10,15 @@
void LoadStateAs();
void SaveQuickSave(int slot);
void LoadQuickSave(int slot);
- void SelectSlot(int slot);
- void PreviousSlot();
- void NextSlot();
+
+ ///
+ /// Overrides the select slot method
+ ///
+ /// Returns whether the function is handled.
+ /// If false, the mainform should continue with its logic
+ bool SelectSlot(int slot);
+ bool PreviousSlot();
+ bool NextSlot();
bool WantsToControlReadOnly { get; }
@@ -31,7 +37,7 @@
/// Should not be called directly.
/// Like MainForm's StopMovie(), saving the movie is part of this function's responsibility.
///
- void StopMovie(bool supressSave);
+ void StopMovie(bool suppressSave);
bool WantsToControlRewind { get; }
diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs
index b58a68411d..f6af9b3e60 100644
--- a/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.cs
@@ -4293,8 +4293,11 @@ namespace BizHawk.Client.EmuHawk
{
if (IsSavestateSlave)
{
- Master.SelectSlot(slot);
- return;
+ var handled = Master.SelectSlot(slot);
+ if (handled)
+ {
+ return;
+ }
}
Global.Config.SaveSlot = slot;
@@ -4309,8 +4312,11 @@ namespace BizHawk.Client.EmuHawk
{
if (IsSavestateSlave)
{
- Master.PreviousSlot();
- return;
+ var handled = Master.PreviousSlot();
+ if (handled)
+ {
+ return;
+ }
}
if (Global.Config.SaveSlot == 0)
@@ -4337,8 +4343,11 @@ namespace BizHawk.Client.EmuHawk
{
if (IsSavestateSlave)
{
- Master.NextSlot();
- return;
+ var handled = Master.NextSlot();
+ if (handled)
+ {
+ return;
+ }
}
if (Global.Config.SaveSlot >= 9)
diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IControlMainform.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IControlMainform.cs
index c7f95fbc04..b10352a3e4 100644
--- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IControlMainform.cs
+++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.IControlMainform.cs
@@ -1,13 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace BizHawk.Client.EmuHawk
+namespace BizHawk.Client.EmuHawk
{
public partial class GenericDebugger : IControlMainform
{
- public bool WantsToControlSavestates { get { return false; } }
+ public bool WantsToControlSavestates => false;
public void SaveState() { }
public void LoadState() { }
@@ -15,22 +10,22 @@ namespace BizHawk.Client.EmuHawk
public void LoadStateAs() { }
public void SaveQuickSave(int slot) { }
public void LoadQuickSave(int slot) { }
- public void SelectSlot(int slot) { }
- public void PreviousSlot() { }
- public void NextSlot() { }
+ public bool SelectSlot(int slot) => false;
+ public bool PreviousSlot() => false;
+ public bool NextSlot() => false;
- public bool WantsToControlReadOnly { get { return false; } }
+ public bool WantsToControlReadOnly => false;
public void ToggleReadOnly() { }
- public bool WantsToControlStopMovie { get { return false; } }
- public void StopMovie(bool supressSave) { }
+ public bool WantsToControlStopMovie => false;
+ public void StopMovie(bool suppressSave) { }
// TODO: We probably want to do this
- public bool WantsToControlRewind { get { return false; } }
+ public bool WantsToControlRewind => false;
public void CaptureRewind() { }
- public bool Rewind() { return false; }
+ public bool Rewind() => false;
- public bool WantsToControlRestartMovie { get { return false; } }
+ public bool WantsToControlRestartMovie => false;
public void RestartMovie() { }
// TODO: We want to prevent movies and probably other things
diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs
index ed58dd96eb..e75103c97d 100644
--- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs
+++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs
@@ -38,19 +38,22 @@
BookMarkControl.LoadBranchExternal(slot);
}
- public void SelectSlot(int slot)
+ public bool SelectSlot(int slot)
{
BookMarkControl.SelectBranchExternal(slot);
+ return false;
}
- public void PreviousSlot()
+ public bool PreviousSlot()
{
BookMarkControl.SelectBranchExternal(false);
+ return false;
}
- public void NextSlot()
+ public bool NextSlot()
{
BookMarkControl.SelectBranchExternal(true);
+ return false;
}
public bool WantsToControlReadOnly => true;