Icon change, and changed _lastAdvancedFrame to private
Had to put code back in to sync it. Changed a variable to private and changed Copy icon on copy cutton to "duplicate". Note: To fix the error with the pull request for being ahead x commits and behind x commits, must merge from upstream/master which got the missing commits.
This commit is contained in:
parent
7f29c4173b
commit
bb0e0522f2
File diff suppressed because it is too large
Load Diff
|
@ -48,6 +48,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private bool _replayMode = false;
|
private bool _replayMode = false;
|
||||||
private int _startFrame = 0;
|
private int _startFrame = 0;
|
||||||
private string _lastRom = "";
|
private string _lastRom = "";
|
||||||
|
private int _lastFrameAdvanced { get; set; }
|
||||||
|
|
||||||
private bool _dontUpdateValues = false;
|
private bool _dontUpdateValues = false;
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private Dictionary<string, double> _cachedControlProbabilities;
|
private Dictionary<string, double> _cachedControlProbabilities;
|
||||||
private ILogEntryGenerator _logGenerator;
|
private ILogEntryGenerator _logGenerator;
|
||||||
|
|
||||||
#region Services and Settings
|
#region Services and Settings
|
||||||
|
|
||||||
[RequiredService]
|
[RequiredService]
|
||||||
|
@ -819,6 +820,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public bool HasFrameAdvanced()
|
||||||
|
{
|
||||||
|
//If the emulator frame is different from the last time it tried calling
|
||||||
|
//the function then we can continue, otherwise we need to stop.
|
||||||
|
return _lastFrameAdvanced != Emulator.Frame;
|
||||||
|
}
|
||||||
private void SetupControlsAndProperties()
|
private void SetupControlsAndProperties()
|
||||||
{
|
{
|
||||||
MaximizeAddressBox.SetHexProperties(_currentDomain.Size);
|
MaximizeAddressBox.SetHexProperties(_currentDomain.Size);
|
||||||
|
@ -898,6 +905,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!HasFrameAdvanced())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_replayMode)
|
if (_replayMode)
|
||||||
{
|
{
|
||||||
int index = Emulator.Frame - _startFrame;
|
int index = Emulator.Frame - _startFrame;
|
||||||
|
@ -941,8 +953,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
_currentBotAttempt = new BotAttempt { Attempt = Attempts };
|
_currentBotAttempt = new BotAttempt { Attempt = Attempts };
|
||||||
GlobalWin.MainForm.LoadQuickSave(SelectedSlot, false, true);
|
GlobalWin.MainForm.LoadQuickSave(SelectedSlot, false, true);
|
||||||
}
|
}
|
||||||
|
//Before this would have 2 additional hits before the frame even advanced, making the amount of inputs greater than the number of frames to test.
|
||||||
PressButtons();
|
if (_currentBotAttempt.Log.Count < FrameLength) //aka do not Add more inputs than there are Frames to test
|
||||||
|
{
|
||||||
|
PressButtons();
|
||||||
|
_lastFrameAdvanced = Emulator.Frame;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1328,7 +1344,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
NumericUpDown numericUpDown = (NumericUpDown)sender;
|
NumericUpDown numericUpDown = (NumericUpDown)sender;
|
||||||
this._comparisonBotAttempt.TieBreak3 = (int)numericUpDown.Value;
|
this._comparisonBotAttempt.TieBreak3 = (int)numericUpDown.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCopyBestInput_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Clipboard.SetText(BestAttemptLogLabel.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HelpToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,9 @@
|
||||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>400, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="StatsContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="StatsContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>248, 17</value>
|
<value>248, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
Loading…
Reference in New Issue