//----------------------------------------------- Load Engine --------------------------------------
char *engineDir, *engineLine, *nickName, *params;
-Boolean isUCI, hasBook, storeVariant, v1, addToList, useNick, secondEng;
+Boolean isUCI, isUSI, hasBook, storeVariant, v1, addToList, useNick, secondEng;
static void EngSel P((int n, int sel));
static int InstallOK P((int n));
{ 0, 0, 0, NULL, (void*) &engineName, NULL, NULL, FileName, N_("Engine Command:") },
{ 0, LR, 0, NULL, NULL, NULL, NULL, Label, N_("(Directory will be derived from engine path when empty)") },
{ 0, 0, 0, NULL, (void*) &isUCI, NULL, NULL, CheckBox, N_("UCI") },
+{ 0, 0, 0, NULL, (void*) &isUSI, NULL, NULL, CheckBox, N_("USI/UCCI (uses specified -uxiAdapter)") },
{ 0, 0, 0, NULL, (void*) &v1, NULL, NULL, CheckBox, N_("WB protocol v1 (do not wait for engine features)") },
{ 0, 0, 0, NULL, (void*) &hasBook, NULL, NULL, CheckBox, N_("Must not use GUI book") },
{ 0, 0, 0, NULL, (void*) &addToList, NULL, NULL, CheckBox, N_("Add this engine to the list") },
ASSIGN(engineLine, engineList[n]);
}
PopDown(TransientDlg); // early popdown, to allow FreezeUI to instate grab
+ if(isUSI) {
+ isUCI = 2; // kludge to pass isUSI to Load()
+ if(!*appData.ucciAdapter) { ASSIGN(appData.ucciAdapter, "usi2wb -%variant \"%fcp\"\"%fd\""); } // make sure -uxiAdapter is defined
+ }
if(!secondEng) Load(&first, 0); else Load(&second, 1);
return FALSE; // no double PopDown!
}
static void
LoadEngineProc (int engineNr, char *title)
{
- isUCI = storeVariant = v1 = useNick = False; addToList = hasBook = True; // defaults
+ isUCI = isUSI = storeVariant = v1 = useNick = False; addToList = hasBook = True; // defaults
secondEng = engineNr;
if(engineLine) free(engineLine); engineLine = strdup("");
if(engineDir) free(engineDir); engineDir = strdup(".");
BoardPopUp (int squareSize, int lineGap, void *clockFontThingy)
{
int i, size = BOARD_WIDTH*(squareSize + lineGap) + lineGap, logo = appData.logoSize;
+ int f = 2*appData.fixedSize; // width fudge, needed for unknown reasons to not clip board
mainOptions[W_WHITE].choice = (char**) clockFontThingy;
mainOptions[W_BLACK].choice = (char**) clockFontThingy;
mainOptions[W_BOARD].value = BOARD_HEIGHT*(squareSize + lineGap) + lineGap;
mainOptions[W_BOARD].max = mainOptions[W_SMALL].max = size; // board size
mainOptions[W_SMALL].max = size - 2; // board title (subtract border!)
mainOptions[W_BLACK].max = mainOptions[W_WHITE].max = size/2-3; // clock width
- mainOptions[W_MESSG].max = appData.showButtonBar ? size-135 : size-2; // message
+ mainOptions[W_MESSG].max = appData.showButtonBar ? size-135+f : size-2+f; // message
mainOptions[W_MENU].max = size-40; // menu bar
mainOptions[W_TITLE].type = appData.titleInWindow ? Label : Skip ;
if(logo && logo <= size/4) { // Activate logos