tastudio: don't count rerecords while drawing
This commit is contained in:
parent
c095bf4b46
commit
e687c4ab1a
|
@ -179,7 +179,7 @@ namespace BizHawk.Client.Common
|
|||
var anyInvalidated = StateManager.Invalidate(frame + 1);
|
||||
Changes = true; // TODO check if this actually removed anything before flagging changes
|
||||
|
||||
if (anyInvalidated)
|
||||
if (anyInvalidated && Global.MovieSession.Movie.IsCountingRerecords)
|
||||
{
|
||||
base.Rerecords++;
|
||||
}
|
||||
|
|
|
@ -599,7 +599,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
e.NewCell == null || e.NewCell.RowIndex == null || e.NewCell.Column == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// skip rerecord counting on drawing entirely, mouse down is enough
|
||||
// avoid introducing another global
|
||||
bool wasCountingRerecords = Global.MovieSession.Movie.IsCountingRerecords;
|
||||
|
||||
int startVal, endVal;
|
||||
int frame = e.NewCell.RowIndex.Value;
|
||||
|
@ -714,6 +718,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
// Left-click
|
||||
else if (TasView.IsPaintDown && e.NewCell.RowIndex.HasValue && !string.IsNullOrEmpty(_startBoolDrawColumn))
|
||||
{
|
||||
Global.MovieSession.Movie.IsCountingRerecords = false;
|
||||
|
||||
if (e.OldCell.RowIndex.HasValue && e.NewCell.RowIndex.HasValue)
|
||||
{
|
||||
for (int i = startVal; i <= endVal; i++) // Inclusive on both ends (drawing up or down)
|
||||
|
@ -733,7 +739,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
else if (TasView.IsPaintDown && e.NewCell.RowIndex.HasValue && !string.IsNullOrEmpty(_startFloatDrawColumn))
|
||||
{
|
||||
{
|
||||
Global.MovieSession.Movie.IsCountingRerecords = false;
|
||||
|
||||
if (e.OldCell.RowIndex.HasValue && e.NewCell.RowIndex.HasValue)
|
||||
{
|
||||
for (int i = startVal; i <= endVal; i++) // Inclusive on both ends (drawing up or down)
|
||||
|
@ -752,6 +760,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
Global.MovieSession.Movie.IsCountingRerecords = wasCountingRerecords;
|
||||
|
||||
if (mouseButtonHeld)
|
||||
{
|
||||
TasView.MakeIndexVisible(TasView.CurrentCell.RowIndex.Value); // todo: limit scrolling speed
|
||||
|
|
Loading…
Reference in New Issue