diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs index 312d102bff..071fafd12a 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.cs @@ -1016,6 +1016,38 @@ namespace BizHawk.Client.EmuHawk // TODO add query callback of whether to select the cell or not protected override void OnMouseDown(MouseEventArgs e) { + if (!GlobalWin.MainForm.EmulatorPaused && _currentX.HasValue) + { + // copypaste from OnMouseMove() + Cell newCell = CalculatePointedCell(_currentX.Value, _currentY.Value); + if (QueryFrameLag != null && newCell.RowIndex.HasValue) + { + newCell.RowIndex += CountLagFramesDisplay(newCell.RowIndex.Value); + } + newCell.RowIndex += FirstVisibleRow; + if (newCell.RowIndex < 0) + newCell.RowIndex = 0; + + if (!newCell.Equals(CurrentCell)) + { + CellChanged(newCell); + + if (IsHoveringOnColumnCell || + (WasHoveringOnColumnCell && !IsHoveringOnColumnCell)) + { + Refresh(); + } + else if (_columnDown != null) + { + Refresh(); + } + } + else if (_columnDown != null) + { + Refresh(); + } + } + if (e.Button == MouseButtons.Left) { if (IsHoveringOnColumnCell) @@ -1430,41 +1462,6 @@ namespace BizHawk.Client.EmuHawk if (CurrentCell == null) return; - - if (!GlobalWin.MainForm.EmulatorPaused && _currentX.HasValue) - { - if (CurrentCell.Column.Name == "CursorColumn" && IsPaintDown) - return; - - // copypaste from OnMouseMove() - Cell newCell = CalculatePointedCell(_currentX.Value, _currentY.Value); - if (QueryFrameLag != null && newCell.RowIndex.HasValue) - { - newCell.RowIndex += CountLagFramesDisplay(newCell.RowIndex.Value); - } - newCell.RowIndex += FirstVisibleRow; - if (newCell.RowIndex < 0) - newCell.RowIndex = 0; - - if (!newCell.Equals(CurrentCell)) - { - CellChanged(newCell); - - if (IsHoveringOnColumnCell || - (WasHoveringOnColumnCell && !IsHoveringOnColumnCell)) - { - Refresh(); - } - else if (_columnDown != null) - { - Refresh(); - } - } - else if (_columnDown != null) - { - Refresh(); - } - } } private void HorizontalBar_ValueChanged(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 1bd8be02f4..5551af954c 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -109,6 +109,7 @@ namespace BizHawk.Client.EmuHawk private void SaveAsTas(object sender, EventArgs e) { _autosaveTimer.Stop(); + ClearLeftMouseStates(); var filename = CurrentTasMovie.Filename; if (string.IsNullOrWhiteSpace(filename) || filename == DefaultTasProjName()) {