aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/right_panel')
-rw-r--r--src/game_tab/right_panel/LiveEngineDialog.cpp9
-rw-r--r--src/game_tab/right_panel/LiveEngineDialog.hpp1
2 files changed, 9 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);
diff --git a/src/game_tab/right_panel/LiveEngineDialog.hpp b/src/game_tab/right_panel/LiveEngineDialog.hpp
index 2ba39c1..a74a2d6 100644
--- a/src/game_tab/right_panel/LiveEngineDialog.hpp
+++ b/src/game_tab/right_panel/LiveEngineDialog.hpp
@@ -16,6 +16,7 @@ class LiveEngineDialog : public DialogLiveEngine {
uciadapter::UCI *engine;
std::string engine_name;
std::string confGroup;
+ std::string optmultipv;
wxTimer timer;
/// @brief The following time interval definitely need to be configure in the user settings (set to 1s for now)