better handling of tastudio interaction with select slot, previous slot, and next slot functions
This commit is contained in:
parent
a6eee3681f
commit
6ae1eac464
|
@ -10,9 +10,15 @@
|
|||
void LoadStateAs();
|
||||
void SaveQuickSave(int slot);
|
||||
void LoadQuickSave(int slot);
|
||||
void SelectSlot(int slot);
|
||||
void PreviousSlot();
|
||||
void NextSlot();
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the select slot method
|
||||
/// </summary>
|
||||
/// <returns>Returns whether the function is handled.
|
||||
/// If false, the mainform should continue with its logic</returns>
|
||||
bool SelectSlot(int slot);
|
||||
bool PreviousSlot();
|
||||
bool NextSlot();
|
||||
|
||||
bool WantsToControlReadOnly { get; }
|
||||
|
||||
|
@ -31,7 +37,7 @@
|
|||
/// Should not be called directly.
|
||||
/// <remarks>Like MainForm's StopMovie(), saving the movie is part of this function's responsibility.</remarks>
|
||||
/// </summary>
|
||||
void StopMovie(bool supressSave);
|
||||
void StopMovie(bool suppressSave);
|
||||
|
||||
bool WantsToControlRewind { get; }
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue