From: H.G.Muller Date: Wed, 15 Oct 2014 21:48:14 +0000 (+0200) Subject: Don't switch to engine-defined variant on game loading X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=22fb70979f674fbf883e007998e8a2399c6745ad;p=xboard.git Don't switch to engine-defined variant on game loading When loading a game from PGN the variant tag will have been decoded as 'normal' in case of an engine-defined variant, and we certainly would not want to switch to that. Better stay in the variant the user had selected before, and hope for the best. --- diff --git a/backend.c b/backend.c index fe70fd2..eb9059f 100644 --- a/backend.c +++ b/backend.c @@ -12857,7 +12857,7 @@ LoadGame (FILE *f, int gameNumber, char *title, int useList) if (!err) numPGNTags++; /* [HGM] PGNvariant: automatically switch to variant given in PGN tag */ - if(gameInfo.variant != oldVariant) { + if(gameInfo.variant != oldVariant && (gameInfo.variant != VariantNormal || gameInfo.variantName == NULL || *gameInfo.variantName == NULLCHAR)) { startedFromPositionFile = FALSE; /* [HGM] loadPos: variant switch likely makes position invalid */ ResetFrontEnd(); // [HGM] might need other bitmaps. Cannot use Reset() because it clears gameInfo :-( InitPosition(TRUE);