From 0c50ae2ce35e3d7811154badc483049dd33979fc Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 19 Jan 2014 20:44:33 +0100 Subject: [PATCH] Put ponder checkbox in Common Engine dialog WB This is yet another duplicate of the one in General Options and Adjudiactions. --- winboard/winboard.rc | 2 ++ winboard/woptions.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 08bffff..4455d32 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -999,6 +999,8 @@ BEGIN PUSHBUTTON "...",IDC_BrowseForEGTB,226,40,17,14 LTEXT "EGTB Size (MB):",IDC_Cache,2,62,78,8 EDITTEXT IDC_SizeOfEGTB,82,58,40,14,ES_AUTOHSCROLL + CONTROL "Ponder Next Move",OPT_PonderNextMove,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,136,62,100,10 CONTROL "Use Book:",IDC_UseBook,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,80,78,10 EDITTEXT IDC_BookFile,82,76,140,14,ES_AUTOHSCROLL diff --git a/winboard/woptions.c b/winboard/woptions.c index d7e9c4e..a42b513 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -3077,6 +3077,8 @@ LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM SetDlgItemInt( hDlg, IDC_Games, appData.defaultMatchGames, TRUE ); SendDlgItemMessage( hDlg, IDC_PolyglotDir, EM_SETSEL, 0, -1 ); + // [HGM] Yet another ponder duplicate + CheckDlgButton( hDlg, OPT_PonderNextMove, (BOOL) appData.ponderNextMove ); return TRUE; @@ -3096,10 +3098,11 @@ LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM GetDlgItemText( hDlg, IDC_BookFile, buf, sizeof(buf) ); appData.polyglotBook = strdup(buf); appData.usePolyglotBook = (Boolean) IsDlgButtonChecked( hDlg, IDC_UseBook ); - // [HGM] smp: get nr of cores: + // [HGM] smp: get nr of cores and ponder: oldCores = appData.smpCores; appData.smpCores = GetDlgItemInt(hDlg, IDC_Cores, NULL, FALSE ); if(appData.smpCores != oldCores) NewSettingEvent(FALSE, &(first.maxCores), "cores", appData.smpCores); + PonderNextMoveEvent((Boolean) IsDlgButtonChecked( hDlg, OPT_PonderNextMove )); // [HGM] book: read tick boxes for own book use appData.firstHasOwnBookUCI = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook1 ); appData.secondHasOwnBookUCI = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook2 ); @@ -3134,6 +3137,7 @@ LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM ofn.hwndOwner = hDlg; ofn.hInstance = hInst; ofn.lpstrFilter = filter; + ofn.lpstrFile = buf; ofn.nMaxFile = sizeof(buf); ofn.lpstrTitle = _("Choose Book"); -- 1.7.0.4