IcsTextMenuEntry icsTextMenuEntry[ICS_TEXT_MENU_SIZE];
int junk;
+Boolean singleList;
void EnsureOnScreen(int *x, int *y, int minX, int minY);
char StringGet(void *getClosure);
{ "-cp", ArgFalse, (void *) &chessProgram, FALSE, INVALID },
{ "icsMenu", ArgString, (void *) &icsTextMenuString, TRUE, (ArgIniType) ICS_TEXT_MENU_DEFAULT },
{ "icsNames", ArgString, (void *) &icsNames, TRUE, (ArgIniType) ICS_NAMES },
+ { "singleEngineList", ArgBoolean, (void *) &singleList, !XBOARD, (ArgIniType) FALSE },
{ "firstChessProgramNames", ArgString, (void *) &firstChessProgramNames,
TRUE, (ArgIniType) FCP_NAMES },
{ "secondChessProgramNames", ArgString, (void *) &secondChessProgramNames,
- TRUE, (ArgIniType) SCP_NAMES },
+ !XBOARD, (ArgIniType) SCP_NAMES },
{ "initialMode", ArgString, (void *) &appData.initialMode, FALSE, (ArgIniType) "" },
{ "mode", ArgString, (void *) &appData.initialMode, FALSE, INVALID },
{ "variant", ArgString, (void *) &appData.variant, FALSE, (ArgIniType) "normal" },
appData.firstChessProgram, "fd", appData.firstDirectory,\r
firstChessProgramNames);\r
InitEngineBox(hDlg, GetDlgItem(hDlg, OPT_SecondChessEngineName),\r
- appData.secondChessProgram, "sd", appData.secondDirectory,\r
- secondChessProgramNames);\r
+ appData.secondChessProgram, singleList ? "fd" : "sd", appData.secondDirectory,\r
+ singleList ? firstChessProgramNames : secondChessProgramNames); //[HGM] single: use first list in second combo\r
hwndCombo = GetDlgItem(hDlg, OPT_ChessServerName);\r
InitComboStringsFromOption(hwndCombo, icsNames); \r
snprintf(buf, MSG_SIZ, "%s /icsport=%s", appData.icsHost, appData.icsPort);\r
GetDlgItemText(hDlg, OPT_ChessEngineName, buf + strlen(buf), sizeof(buf) - strlen(buf));\r
p = buf;\r
ParseArgs(StringGet, &p);\r
- safeStrCpy(buf, "/scp=", sizeof(buf)/sizeof(buf[0]) );\r
+ safeStrCpy(buf, singleList ? "/fcp=" : "/scp=", sizeof(buf)/sizeof(buf[0]) );\r
GetDlgItemText(hDlg, OPT_SecondChessEngineName, buf + strlen(buf), sizeof(buf) - strlen(buf));\r
- p = buf;\r
+ p = buf;
+ SwapEngines(singleList); // temporarily swap first and second, to load a second 'first', ...\r
ParseArgs(StringGet, &p);\r
+ SwapEngines(singleList); // ... and then make it 'second'\r
appData.noChessProgram = FALSE;\r
appData.icsActive = FALSE;\r
} else if (IsDlgButtonChecked(hDlg, OPT_ChessServer)) {\r