have Tastudio control RebootCore when it is open, fixes #2201
This commit is contained in:
parent
5c250a7ca5
commit
0925997557
|
@ -238,13 +238,13 @@ namespace BizHawk.Client.Common
|
|||
public void RunQueuedMovie(bool recordMode, IEmulator emulator, IDictionary<string, string> preferredCores)
|
||||
{
|
||||
MovieController = new Bk2Controller(emulator.ControllerDefinition);
|
||||
_queuedMovie.Attach(emulator);
|
||||
foreach (var previousPref in _preferredCores)
|
||||
{
|
||||
preferredCores[previousPref.Key] = previousPref.Value;
|
||||
}
|
||||
|
||||
Movie = _queuedMovie;
|
||||
Movie.Attach(emulator);
|
||||
_queuedMovie = null;
|
||||
|
||||
Movie.ProcessSavestate(Movie.Emulator);
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
{
|
||||
public interface IControlMainform
|
||||
{
|
||||
bool WantsToControlReboot { get; }
|
||||
void RebootCore();
|
||||
|
||||
bool WantsToControlSavestates { get; }
|
||||
|
||||
void SaveState();
|
||||
|
|
|
@ -1033,8 +1033,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void RebootCore()
|
||||
{
|
||||
if (CurrentlyOpenRomArgs == null) return;
|
||||
LoadRom(CurrentlyOpenRomArgs.OpenAdvanced.SimplePath, CurrentlyOpenRomArgs);
|
||||
if (IsSlave && Master.WantsToControlReboot)
|
||||
{
|
||||
Master.RebootCore();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CurrentlyOpenRomArgs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LoadRom(CurrentlyOpenRomArgs.OpenAdvanced.SimplePath, CurrentlyOpenRomArgs);
|
||||
}
|
||||
}
|
||||
|
||||
public void PauseEmulator()
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
{
|
||||
public partial class GenericDebugger : IControlMainform
|
||||
{
|
||||
|
||||
public bool WantsToControlReboot => false;
|
||||
public void RebootCore()
|
||||
{
|
||||
}
|
||||
|
||||
public bool WantsToControlSavestates => false;
|
||||
|
||||
public void SaveState() { }
|
||||
|
|
|
@ -128,5 +128,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
RefreshDialog();
|
||||
}
|
||||
}
|
||||
|
||||
public bool WantsToControlReboot { get; private set; } = true;
|
||||
|
||||
public void RebootCore()
|
||||
{
|
||||
WantsToControlReboot = false;
|
||||
NewTasMenuItem_Click(null, null);
|
||||
WantsToControlReboot = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue