From 22fb70979f674fbf883e007998e8a2399c6745ad Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 15 Oct 2014 23:48:14 +0200 Subject: [PATCH] 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. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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); -- 1.7.0.4