Ram Search - small todo

This commit is contained in:
adelikat 2013-09-29 18:52:11 +00:00
parent 0c850ef533
commit 173855cc03
1 changed files with 23 additions and 1 deletions

View File

@ -200,7 +200,17 @@ namespace BizHawk.MultiClient
public Compare CompareTo
{
get { return _compareTo; }
set { _compareTo = value; } //TODO: check to see if this value is valid based on mode
set
{
if (CanDoCompareType(value))
{
_compareTo = value;
}
else
{
throw new InvalidOperationException();
}
}
}
public long? CompareValue
@ -678,6 +688,18 @@ namespace BizHawk.MultiClient
}
}
private bool CanDoCompareType(Compare compareType)
{
switch (_settings.Mode)
{
default:
case Settings.SearchMode.Detailed:
return true;
case Settings.SearchMode.Fast:
return !(compareType == Compare.Changes);
}
}
#endregion
#region Classes