From d1612157542c3eedbc2992d2b5fbb6cf4624f996 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Sat, 6 Jul 2024 01:56:13 +0200 Subject: [PATCH] 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. --- .../tools/TAStudio/TAStudio.IControlMainForm.cs | 10 ++-------- .../tools/TAStudio/TAStudio.MenuItems.cs | 8 +------- src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs | 3 --- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs index 2e07f14c3a..c35d8baaf7 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs @@ -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"); } } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 9aa35b61a7..4d2e9d8fea 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -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) { diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 43ef8ace9d..c485621f43 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -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; }