From f0cb9d1167970b9d966ec25dddd2a948e7ce6322 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 7 Nov 2022 19:16:52 +1100 Subject: [PATCH] [client] main: fix spice display fallback when waiting for LGMP upgrade --- client/src/main.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index fb8d8cac..fe61dd58 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1442,21 +1442,19 @@ restart: case LGMP_ERR_INVALID_VERSION: { - reportBadVersion(); - msgs[msgsCount++] = app_msgBox( - "Incompatible LGMP Version", - "The host application is not compatible with this client.\n" - "Please download and install the matching version." - ); + if (waitCount++ == 0) + { + reportBadVersion(); + msgs[msgsCount++] = app_msgBox( + "Incompatible LGMP Version", + "The host application is not compatible with this client.\n" + "Please download and install the matching version." + ); - DEBUG_INFO("Waiting for you to upgrade the host application"); - while (g_state.state == APP_STATE_RUNNING && - lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata) != LGMP_OK) - g_state.ds->wait(1000); - - if (g_state.state != APP_STATE_RUNNING) - return -1; + DEBUG_INFO("Waiting for you to upgrade the host application"); + } + g_state.ds->wait(1000); continue; }