X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=47cc1a3d4215d371012f53001d9999b1f5d946ef;hb=00d7f7869e045cbed5037d39e1e56224692eb766;hp=159c0a10a8b9a7e801741a8beeea77520cc21102;hpb=5d8fad577baa59d7bbe8e9ee1f859161f8edf1b1;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index 159c0a1..47cc1a3 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -686,11 +686,12 @@ void LoadEnginePopUp(HWND hwnd) GenericPopup(hwnd, installOptions); } -Boolean autoinc, twice; +Boolean autoinc, twice, swiss; int MatchOK() { if(autoinc) appData.loadGameIndex = appData.loadPositionIndex = -(twice + 1); + if(swiss) { appData.defaultMatchGames = 1; appData.tourneyType = -1; } if(CreateTourney(appData.tourneyFile)) MatchEvent(2); else return 0; return 1; } @@ -702,6 +703,7 @@ Option tourneyOptions[] = { { 0, 1, 0, NULL, (void*) &engineChoice, (char*) (engineMnemonic+1), (engineMnemonic+1), ComboBox, N_("Select Engine:") }, { 0xD, 7, 0, NULL, (void*) &appData.participants, "", NULL, TextBox, "Tourney participants:" }, { 0, 0, 10, NULL, (void*) &appData.tourneyType, "", NULL, Spin, N_("Tourney type (0=RR, 1=gauntlet):") }, + { 0, 0, 0, NULL, (void*) &swiss, "", NULL, CheckBox, N_("Use Swiss pairing engine (cycles = rounds)") }, { 0, 0, 0, NULL, (void*) &appData.cycleSync, "", NULL, CheckBox, N_("Sync after cycle") }, { 0, 1, 1000000000, NULL, (void*) &appData.tourneyCycles, "", NULL, Spin, N_("Number of tourney cycles:") }, { 0, 0, 0, NULL, (void*) &appData.roundSync, "", NULL, CheckBox, N_("Sync after round") }, @@ -737,9 +739,10 @@ void TourneyPopup(HWND hwnd) NamesToList(firstChessProgramNames, engineList, engineMnemonic); comboCallback = &AddToTourney; autoinc = appData.loadGameIndex < 0 || appData.loadPositionIndex < 0; - twice = TRUE; + twice = TRUE; swiss = appData.tourneyType < 0; while(engineList[n]) n++; tourneyOptions[3].max = n-1; snprintf(title, MSG_SIZ, _("Tournament and Match Options")); + if(appData.pairingEngine[0]) tourneyOptions[5].min = -19; GenericPopup(hwnd, tourneyOptions); }