diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 52df1061cd..0bcd81b99a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -155,6 +155,11 @@ namespace BizHawk.Client.EmuHawk private void TasView_QueryItemIcon(int index, RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY) { + if (!_engaged) + { + return; + } + var overrideIcon = QueryItemIconCallback?.Invoke(index, column.Name); if (overrideIcon != null) @@ -218,6 +223,11 @@ namespace BizHawk.Client.EmuHawk private void TasView_QueryItemBkColor(int index, RollColumn column, ref Color color) { + if (!_engaged) + { + return; + } + Color? overrideColor = QueryItemBgColorCallback?.Invoke(index, column.Name); if (overrideColor.HasValue) @@ -260,6 +270,11 @@ namespace BizHawk.Client.EmuHawk private void TasView_QueryRowBkColor(int index, ref Color color) { + if (!_engaged) + { + return; + } + var record = CurrentTasMovie[index]; if (MainForm.IsSeeking && MainForm.PauseOnFrame == index) @@ -299,6 +314,12 @@ namespace BizHawk.Client.EmuHawk private void TasView_QueryItemText(int index, RollColumn column, out string text, ref int offsetX, ref int offsetY) { + if (!_engaged) + { + text = ""; + return; + } + var overrideText = QueryItemTextCallback?.Invoke(index, column.Name); if (overrideText != null) { diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 35de1c133c..660b6229d7 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -33,6 +33,7 @@ namespace BizHawk.Client.EmuHawk private bool _initialized; private bool _exiting; + private bool _engaged; private bool CanAutoload => Settings.RecentTas.AutoLoad && !string.IsNullOrEmpty(Settings.RecentTas.MostRecent); @@ -109,7 +110,6 @@ namespace BizHawk.Client.EmuHawk recentMacrosToolStripMenuItem.Image = Properties.Resources.Recent; TASEditorManualOnlineMenuItem.Image = Properties.Resources.Help; ForumThreadMenuItem.Image = Properties.Resources.TAStudio; - Icon = Properties.Resources.TAStudio_MultiSize; } @@ -210,6 +210,7 @@ namespace BizHawk.Client.EmuHawk private bool Engage() { + _engaged = false; MainForm.PauseOnFrame = null; MainForm.PauseEmulator(); @@ -283,6 +284,7 @@ namespace BizHawk.Client.EmuHawk SetSplicer(); SetupBoolPatterns(); + _engaged = true; return true; } @@ -790,6 +792,7 @@ namespace BizHawk.Client.EmuHawk private void Disengage() { + _engaged = false; MainForm.PauseOnFrame = null; MainForm.AddOnScreenMessage("TAStudio disengaged"); MainForm.TakeBackControl();