Tastudio - fix issue 356, don't crash when clicking a float column when the movie has no input yet

This commit is contained in:
adelikat 2015-01-05 00:43:02 +00:00
parent 3438039c5e
commit c03fc0be81
1 changed files with 10 additions and 1 deletions
BizHawk.Client.EmuHawk/tools/TAStudio

View File

@ -256,7 +256,16 @@ namespace BizHawk.Client.EmuHawk
else
{
_startFloatDrawColumn = buttonName;
_floatPaintState = CurrentTasMovie.GetFloatValue(frame, buttonName);
float _floatPaintState = 0;
if (frame < CurrentTasMovie.InputLogLength)
{
_floatPaintState = CurrentTasMovie.GetFloatValue(frame, buttonName);
}
else
{
_floatPaintState = Global.ClickyVirtualPadController.GetFloat(buttonName);
}
}
}
}