Don't control reboot in TAStudio

There seems to be no good reason for why this would be necessary. TAStudio behaves just fine when the MainForm reboots itself.
This commit is contained in:
Morilli 2024-07-06 01:56:13 +02:00
parent 74970cc576
commit d161215754
3 changed files with 3 additions and 18 deletions

View File

@ -113,13 +113,7 @@
return success;
}
public bool WantsToControlReboot { get; private set; } = true;
public void RebootCore()
{
WantsToControlReboot = false;
NewTasMenuItem_Click(null, null);
WantsToControlReboot = true;
}
public bool WantsToControlReboot => false;
public void RebootCore() => throw new NotSupportedException("This should never be called");
}
}

View File

@ -65,13 +65,7 @@ namespace BizHawk.Client.EmuHawk
private void RecentSubMenu_DropDownOpened(object sender, EventArgs e)
=> RecentSubMenu.ReplaceDropDownItems(Settings.RecentTas.RecentMenu(this, DummyLoadProject, "Project"));
private void NewTasMenuItem_Click(object sender, EventArgs e)
{
var prev = WantsToControlReboot;
WantsToControlReboot = false;
StartNewTasMovie();
WantsToControlReboot = prev;
}
private void NewTasMenuItem_Click(object sender, EventArgs e) => StartNewTasMovie();
private void OpenTasMenuItem_Click(object sender, EventArgs e)
{

View File

@ -634,9 +634,7 @@ namespace BizHawk.Client.EmuHawk
SetTasMovieCallbacks(movie);
SuspendLayout();
WantsToControlReboot = false;
bool result = MainForm.StartNewMovie(movie, false);
WantsToControlReboot = true;
ResumeLayout();
if (result)
{
@ -683,7 +681,6 @@ namespace BizHawk.Client.EmuHawk
if (!movieLoadSucceeded)
{
TasView.AllColumns.Clear();
WantsToControlReboot = false;
StartNewTasMovie();
_engaged = true;
}