aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel/LiveEngineDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/right_panel/LiveEngineDialog.cpp')
-rw-r--r--src/game_tab/right_panel/LiveEngineDialog.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game_tab/right_panel/LiveEngineDialog.cpp b/src/game_tab/right_panel/LiveEngineDialog.cpp
index d0b1896..4e86c63 100644
--- a/src/game_tab/right_panel/LiveEngineDialog.cpp
+++ b/src/game_tab/right_panel/LiveEngineDialog.cpp
@@ -46,7 +46,8 @@ void LiveEngineDialog::InitEngine() {
std::string default_value = default_value_wxString.ToStdString();
engine->setoption(opt_name.ToStdString(), default_value);
if (opt_name.Lower() == "multipv") {
- multipv->SetLabel(default_value_wxString);
+ optmultipv=opt_name;
+ multipv->SetValue(std::stoi(default_value_wxString.ToStdString()));
} else if (opt_name.Lower() == "threads") {
threads->SetLabel(default_value_wxString);
}
@@ -55,6 +56,8 @@ void LiveEngineDialog::InitEngine() {
CONFIG_CLOSE(conf);
}
+ depth->Enable(false);
+ multipv->Enable(false);
timer.Start(interval);
timer.Bind(wxEVT_TIMER, &LiveEngineDialog::OnTimerTick, this);
}
@@ -84,9 +87,11 @@ void LiveEngineDialog::TogglePauseEngine(wxCommandEvent &event) {
StopEngine();
engine_stop_button->SetLabel("Restart");
depth->Enable(true);
+ multipv->Enable(true);
} else {
engine_stop_button->SetLabel("Stop");
depth->Enable(false);
+ multipv->Enable(false);
StartEngine();
}
}
@@ -101,6 +106,8 @@ void LiveEngineDialog::StopEngine() {
void LiveEngineDialog::StartEngine() {
uciadapter::Go args;
args.depth = depth->GetValue();
+ if(optmultipv.size()>0)
+ engine->setoption(optmultipv, std::to_string(multipv->GetValue()));
engine->go(args);
if (!timer.IsRunning()) {
timer.Start(interval);