DroidFish: Preserve case of UCI option names in the setoption command. Some engines (such as Greko) think UCI options are case sensitive.

This commit is contained in:
Peter Osterlund 2014-10-21 19:44:43 +00:00
parent 4e24dd48da
commit 782fb97ae4

View File

@ -276,11 +276,11 @@ public abstract class UCIEngineBase implements UCIEngine {
return false;
UCIOptions.OptionBase o = options.getOption(name);
if (o instanceof UCIOptions.ButtonOption) {
writeLineToEngine(String.format(Locale.US, "setoption name %s", name));
writeLineToEngine(String.format(Locale.US, "setoption name %s", o.name));
} else if (o.setFromString(value)) {
if (value.length() == 0)
value = "<empty>";
writeLineToEngine(String.format(Locale.US, "setoption name %s value %s", name, value));
writeLineToEngine(String.format(Locale.US, "setoption name %s value %s", o.name, value));
return true;
}
return false;