Ram Search - fix exceptions caused by null compare to values
This commit is contained in:
parent
be742bc919
commit
2885edef78
|
@ -77,12 +77,27 @@ namespace BizHawk.MultiClient
|
||||||
LoadConfigSettings();
|
LoadConfigSettings();
|
||||||
SpecificValueBox.ByteSize = Settings.Size;
|
SpecificValueBox.ByteSize = Settings.Size;
|
||||||
SpecificValueBox.Type = Settings.Type;
|
SpecificValueBox.Type = Settings.Type;
|
||||||
|
|
||||||
|
SpecificValueBox.Nullable =
|
||||||
|
SpecificAddressBox.Nullable =
|
||||||
|
NumberOfChangesBox.Nullable =
|
||||||
|
DifferenceBox.Nullable =
|
||||||
|
DifferentByBox.Nullable =
|
||||||
|
false;
|
||||||
|
|
||||||
MessageLabel.Text = String.Empty;
|
MessageLabel.Text = String.Empty;
|
||||||
SpecificAddressBox.MaxLength = IntHelpers.GetNumDigits(Global.Emulator.MainMemory.Size);
|
SpecificAddressBox.MaxLength = IntHelpers.GetNumDigits(Global.Emulator.MainMemory.Size);
|
||||||
SizeDropdown.SelectedIndex = 0;
|
SizeDropdown.SelectedIndex = 0;
|
||||||
PopulateTypeDropDown();
|
PopulateTypeDropDown();
|
||||||
DoDomainSizeCheck();
|
DoDomainSizeCheck();
|
||||||
SetReboot(false);
|
SetReboot(false);
|
||||||
|
|
||||||
|
SpecificValueBox.ResetText();
|
||||||
|
SpecificAddressBox.ResetText();
|
||||||
|
NumberOfChangesBox.ResetText();
|
||||||
|
DifferenceBox.ResetText();
|
||||||
|
DifferentByBox.ResetText();
|
||||||
|
|
||||||
dropdown_dontfire = false;
|
dropdown_dontfire = false;
|
||||||
|
|
||||||
NewSearch();
|
NewSearch();
|
||||||
|
@ -1281,9 +1296,9 @@ namespace BizHawk.MultiClient
|
||||||
SpecificValueBox.Enabled = true;
|
SpecificValueBox.Enabled = true;
|
||||||
if (String.IsNullOrWhiteSpace(SpecificValueBox.Text))
|
if (String.IsNullOrWhiteSpace(SpecificValueBox.Text))
|
||||||
{
|
{
|
||||||
SpecificValueBox.Text = "0";
|
SpecificAddressBox.ResetText();
|
||||||
Searches.CompareValue = 0;
|
|
||||||
}
|
}
|
||||||
|
Searches.CompareValue = SpecificValueBox.ToRawInt();
|
||||||
SpecificValueBox.Focus();
|
SpecificValueBox.Focus();
|
||||||
SpecificAddressBox.Enabled = false;
|
SpecificAddressBox.Enabled = false;
|
||||||
NumberOfChangesBox.Enabled = false;
|
NumberOfChangesBox.Enabled = false;
|
||||||
|
@ -1297,9 +1312,10 @@ namespace BizHawk.MultiClient
|
||||||
SpecificAddressBox.Enabled = true;
|
SpecificAddressBox.Enabled = true;
|
||||||
if (String.IsNullOrWhiteSpace(SpecificAddressBox.Text))
|
if (String.IsNullOrWhiteSpace(SpecificAddressBox.Text))
|
||||||
{
|
{
|
||||||
SpecificAddressBox.Text = "0";
|
SpecificAddressBox.ResetText();
|
||||||
Searches.CompareValue = 0;
|
|
||||||
}
|
}
|
||||||
|
Searches.CompareValue = SpecificAddressBox.ToRawInt();
|
||||||
SpecificAddressBox.Focus();
|
SpecificAddressBox.Focus();
|
||||||
NumberOfChangesBox.Enabled = false;
|
NumberOfChangesBox.Enabled = false;
|
||||||
DifferenceBox.Enabled = false;
|
DifferenceBox.Enabled = false;
|
||||||
|
@ -1313,9 +1329,10 @@ namespace BizHawk.MultiClient
|
||||||
NumberOfChangesBox.Enabled = true;
|
NumberOfChangesBox.Enabled = true;
|
||||||
if (String.IsNullOrWhiteSpace(NumberOfChangesBox.Text))
|
if (String.IsNullOrWhiteSpace(NumberOfChangesBox.Text))
|
||||||
{
|
{
|
||||||
NumberOfChangesBox.Text = "0";
|
NumberOfChangesBox.ResetText();
|
||||||
Searches.CompareValue = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Searches.CompareValue = NumberOfChangesBox.ToRawInt();
|
||||||
NumberOfChangesBox.Focus();
|
NumberOfChangesBox.Focus();
|
||||||
DifferenceBox.Enabled = false;
|
DifferenceBox.Enabled = false;
|
||||||
SetCompareTo(RamSearchEngine.Compare.Changes);
|
SetCompareTo(RamSearchEngine.Compare.Changes);
|
||||||
|
@ -1329,9 +1346,9 @@ namespace BizHawk.MultiClient
|
||||||
DifferenceBox.Enabled = true;
|
DifferenceBox.Enabled = true;
|
||||||
if (String.IsNullOrWhiteSpace(DifferenceBox.Text))
|
if (String.IsNullOrWhiteSpace(DifferenceBox.Text))
|
||||||
{
|
{
|
||||||
DifferenceBox.Text = "0";
|
DifferenceBox.ResetText();
|
||||||
Searches.CompareValue = 0;
|
|
||||||
}
|
}
|
||||||
|
Searches.CompareValue = DifferenceBox.ToRawInt();
|
||||||
DifferenceBox.Focus();
|
DifferenceBox.Focus();
|
||||||
SetCompareTo(RamSearchEngine.Compare.Difference);
|
SetCompareTo(RamSearchEngine.Compare.Difference);
|
||||||
}
|
}
|
||||||
|
@ -1387,8 +1404,9 @@ namespace BizHawk.MultiClient
|
||||||
SetComparisonOperator(RamSearchEngine.ComparisonOperator.DifferentBy);
|
SetComparisonOperator(RamSearchEngine.ComparisonOperator.DifferentBy);
|
||||||
if (String.IsNullOrWhiteSpace(DifferentByBox.Text))
|
if (String.IsNullOrWhiteSpace(DifferentByBox.Text))
|
||||||
{
|
{
|
||||||
DifferentByBox.Text = "0";
|
DifferentByBox.ResetText();
|
||||||
}
|
}
|
||||||
|
Searches.DifferentBy = DifferenceBox.ToRawInt();
|
||||||
DifferentByBox.Focus();
|
DifferentByBox.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue