From: H.G.Muller Date: Fri, 29 Aug 2014 19:15:29 +0000 (+0200) Subject: Fix castling rights on using -lgf X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=5ac80d2f3c2a7720f3095a8e4145b1780494dfd2 Fix castling rights on using -lgf The dummy InitPosition to force loading pieces was taking place after InitBackend2(), while the latter could have already loaded a game from an -lgf argument (which would then be spoiled by the InitPosition). It has been moved to before InitBackend2() now. --- diff --git a/gtk/xboard.c b/gtk/xboard.c index e42f090..d6f47d7 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -1152,6 +1152,9 @@ main (int argc, char **argv) BoardToTop(); } + gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() + InitPosition(TRUE); + InitBackEnd2(); if (errorExitStatus == -1) { @@ -1172,8 +1175,6 @@ main (int argc, char **argv) } } - gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() - InitPosition(TRUE); UpdateLogos(TRUE); // XtSetKeyboardFocus(shellWidget, formWidget); #ifdef TODO_GTK diff --git a/xaw/xboard.c b/xaw/xboard.c index 8d0fb24..ac57033 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -1320,6 +1320,9 @@ main (int argc, char **argv) EngineOutputPopUp(); } + gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() + InitPosition(TRUE); + InitBackEnd2(); if (errorExitStatus == -1) { @@ -1340,8 +1343,6 @@ main (int argc, char **argv) } } - gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() - InitPosition(TRUE); UpdateLogos(TRUE); // XtSetKeyboardFocus(shellWidget, formWidget); XSetInputFocus(xDisplay, XtWindow(formWidget), RevertToPointerRoot, CurrentTime);