X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=f3e8f67a376f2a7f2cbeaf87b7766325435eb34e;hb=407cd1126c6c24d890359f1fe1686f6d90c0ad61;hp=b47f9a4d67e6b738865b0b2bf02246c60bbb21c4;hpb=4b4ee0f5a685c7cca0c5f5b791f05ee157b4a219;p=xboard.git diff --git a/xoptions.c b/xoptions.c index b47f9a4..f3e8f67 100644 --- a/xoptions.c +++ b/xoptions.c @@ -780,7 +780,7 @@ void GenericPopDown(w, event, prms, nprms) PopDown(prms[0][0] - '0'); } -char *engineName, *engineDir, *engineChoice, *engineLine, *nickName, *params; +char *engineName, *engineDir, *engineChoice, *engineLine, *nickName, *params, *tfName; Boolean isUCI, hasBook, storeVariant, v1, addToList, useNick; extern Option installOptions[], matchOptions[]; char *engineNr[] = { N_("First Engine"), N_("Second Engine"), NULL }; @@ -803,14 +803,14 @@ int MatchOK(int n) { if(appData.participants && appData.participants[0]) free(appData.participants); appData.participants = strdup(engineName); - if(!CreateTourney(appData.tourneyFile)) return 0; + if(!CreateTourney(tfName)) return !appData.participants[0]; PopDown(0); // early popdown to prevent FreezeUI called through MatchEvent from causing XtGrab warning MatchEvent(2); // start tourney return 1; } Option matchOptions[] = { -{ 0, 0, 0, NULL, (void*) &appData.tourneyFile, ".trn", NULL, FileName, N_("Tournament file:") }, +{ 0, 0, 0, NULL, (void*) &tfName, ".trn", NULL, FileName, N_("Tournament file:") }, { 0, 0, 0, NULL, (void*) &appData.roundSync, "", NULL, CheckBox, N_("Sync after round (for concurrent playing of a single") }, { 0, 0, 0, NULL, (void*) &appData.cycleSync, "", NULL, CheckBox, N_("Sync after cycle tourney with multiple XBoards)") }, { 0xD, 150, 0, NULL, (void*) &engineName, "", NULL, TextBox, "Tourney participants:" }, @@ -1771,6 +1771,7 @@ void MatchOptionsProc(w, event, prms, nprms) NamesToList(firstChessProgramNames, engineList, engineMnemonic); comboCallback = &AddToTourney; matchOptions[5].min = -(appData.pairingEngine[0] != NULLCHAR); // with pairing engine, allow Swiss + ASSIGN(tfName, appData.tourneyFile[0] ? appData.tourneyFile : MakeName(appData.defName)); GenericPopUp(matchOptions, _("Match Options"), 0); }