Async UCI options actions

Introduce 'on change' actions that are triggered as soon as
an UCI option is changed by the GUI. This allows to set hash
size before to start the game, helpful especially on very fast
TC and big TT size.

As a side effect remove the 'button' type option, that now
is managed as a 'check' type.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-03-04 17:57:01 +01:00
parent 482b5b7ece
commit 2ef5b4066e
5 changed files with 32 additions and 20 deletions

View File

@@ -278,14 +278,6 @@ void Search::think() {
// Read UCI options: GUI could change UCI parameters during the game
read_evaluation_uci_options(pos.side_to_move());
Threads.read_uci_options();
TT.set_size(Options["Hash"]);
if (Options["Clear Hash"])
{
Options["Clear Hash"] = false;
TT.clear();
}
UCIMultiPV = Options["MultiPV"];
SkillLevel = Options["Skill Level"];