X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=e02bc174881acb8bd489bf11f5a260f658709ce1;hb=a79a38d1732331e3920ee06fde662fa0f4bc1405;hp=83574f7768c95161092808287740cc66be18a366;hpb=bfe8eb2a44461434b4572e4e938b3ab4fa657644;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 83574f7..e02bc17 100644 --- a/dialogs.c +++ b/dialogs.c @@ -577,11 +577,17 @@ NewVariantProc () //------------------------------------------- Common Engine Options ------------------------------------- static int oldCores; +static char *egtPath; static int CommonOptionsOK (int n) { int newPonder = appData.ponderNextMove; + if(*egtPath != '/' && strchr(egtPath, ':')) { + ASSIGN(appData.egtFormats, egtPath); + } else { + ASSIGN(appData.defaultPathEGTB, egtPath); + } // make sure changes are sent to first engine by re-initializing it // if it was already started pre-emptively at end of previous game if(gameMode == BeginningOfGame) Reset(True, True); else { @@ -599,7 +605,7 @@ static Option commonEngineOptions[] = { { 0, 0, 1000, NULL, (void*) &appData.smpCores, "", NULL, Spin, N_("Maximum Number of CPUs per Engine:") }, { 0, 0, 0, NULL, (void*) &appData.polyglotDir, "", NULL, PathName, N_("Polygot Directory:") }, { 0, 0,16000, NULL, (void*) &appData.defaultHashSize, "", NULL, Spin, N_("Hash-Table Size (MB):") }, -{ 0, 0, 0, NULL, (void*) &appData.defaultPathEGTB, "", NULL, PathName, N_("Nalimov EGTB Path:") }, +{ 0, 0, 0, NULL, (void*) &egtPath, "", NULL, PathName, N_("EGTB Path:") }, { 0, 0, 1000, NULL, (void*) &appData.defaultCacheSizeEGTB, "", NULL, Spin, N_("EGTB Cache Size (MB):") }, { 0, 0, 0, NULL, (void*) &appData.usePolyglotBook, "", NULL, CheckBox, N_("Use GUI Book") }, { 0, 0, 0, NULL, (void*) &appData.polyglotBook, ".bin", NULL, FileName, N_("Opening-Book Filename:") }, @@ -615,6 +621,8 @@ UciMenuProc () { oldCores = appData.smpCores; oldPonder = appData.ponderNextMove; + if(appData.egtFormats && *appData.egtFormats) { ASSIGN(egtPath, appData.egtFormats); } + else { ASSIGN(egtPath, appData.defaultPathEGTB); } GenericPopUp(commonEngineOptions, _("Common Engine Settings"), TransientDlg, BoardWindow, MODAL, 0); }