Skip to content

Commit

Permalink
suppress_ucinewgame
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed Aug 19, 2024
1 parent f1c717b commit 6d72609
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions files/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4462,6 +4462,17 @@ function menu_build() {
});
}
},
{
label: "Suppress ucinewgame",
type: "checkbox",
checked: config.suppress_ucinewgame,
click: () => {
win.webContents.send("call", {
fn: "toggle",
args: ["suppress_ucinewgame"],
});
}
},
]
},
{
Expand Down
1 change: 1 addition & 0 deletions files/src/modules/config_io.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ exports.defaults = {
"allow_stopped_analysis": false,
"never_suppress_searchmoves": true,
"never_grayout_infolines": false,
"suppress_ucinewgame": false,

"show_engine_state": false,

Expand Down
4 changes: 3 additions & 1 deletion files/src/renderer/95_hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ let hub_props = {
this.node_to_clean = null;
this.leela_lock_node = null;
this.set_behaviour("halt"); // Will cause "stop" to be sent.
this.engine.send_ucinewgame(); // Must happen after "stop" is sent.
if (!config.suppress_ucinewgame) {
this.engine.send_ucinewgame(); // Must happen after "stop" is sent.
}
this.send_title();
if (this.engine.ever_received_uciok && !this.engine.in_960_mode() && this.tree.node.board.normalchess === false) {
alert(messages.c960_warning);
Expand Down

0 comments on commit 6d72609

Please sign in to comment.