Skip to content

Commit

Permalink
Don't control reboot in TAStudio
Browse files Browse the repository at this point in the history
There seems to be no good reason for why this would be necessary. TAStudio behaves just fine when the MainForm reboots itself.
  • Loading branch information
Morilli committed Jul 5, 2024
1 parent 74970cc commit d161215
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,7 @@ public bool RestartMovie()
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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ private void StartANewProjectFromSaveRamMenuItem_Click(object sender, EventArgs
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)
{
Expand Down
3 changes: 0 additions & 3 deletions src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,7 @@ private bool StartNewMovieWrapper(ITasMovie movie)
SetTasMovieCallbacks(movie);

SuspendLayout();
WantsToControlReboot = false;
bool result = MainForm.StartNewMovie(movie, false);
WantsToControlReboot = true;
ResumeLayout();
if (result)
{
Expand Down Expand Up @@ -683,7 +681,6 @@ private bool LoadFileWithFallback(string path)
if (!movieLoadSucceeded)
{
TasView.AllColumns.Clear();
WantsToControlReboot = false;
StartNewTasMovie();
_engaged = true;
}
Expand Down

0 comments on commit d161215

Please sign in to comment.