From 3fb931964b7214f293750b842495eff5774cfa8b Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 26 Nov 2011 22:22:07 +0100 Subject: [PATCH] Ignore ICS game starts when already in game The advance switching of the variant on game-start messages was disruptive for users with gin=1, which also sends such messages for other games than your own. For now fixed by only reacting on them when idle (detected by invalid game number). --- backend.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index ca3e342..4d4b6fa 100644 --- a/backend.c +++ b/backend.c @@ -3863,6 +3863,7 @@ read_from_ics(isr, closure, data, count, error) strncmp(why, "Continuing ", 11) == 0) { gs_gamenum = gamenum; safeStrCpy(gs_kind, strchr(why, ' ') + 1,sizeof(gs_kind)/sizeof(gs_kind[0])); + if(ics_gamenum == -1) // [HGM] only if we are not already involved in a game (because gin=1 sends us such messages) VariantSwitch(boards[currentMove], StringToVariant(gs_kind)); // [HGM] variantswitch: even before we get first board #if ZIPPY if (appData.zippyPlay) { -- 1.7.0.4