From 0d00936aacc718f3db95b409c7b2c43cdb307c03 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 4 Jan 2022 19:06:14 +1100 Subject: [PATCH] [client] spice: update PureSpice submodule --- client/src/main.c | 24 ++++++++---------------- repos/PureSpice | 2 +- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 58837792..31e7681b 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -837,6 +837,12 @@ static void audioData(uint8_t * data, size_t size) g_state.audioDev->play(data, size); } +void spiceReady(void) +{ + // set the intial mouse mode + purespice_mouseMode(true); +} + int spiceThread(void * arg) { const struct PSConfig config = @@ -844,6 +850,7 @@ int spiceThread(void * arg) .host = g_params.spiceHost, .port = g_params.spicePort, .password = "", + .ready = spiceReady, .log = { .info = debug_info, @@ -875,21 +882,6 @@ int spiceThread(void * arg) goto end; } - // wait for spice to finish connecting - while(g_state.state != APP_STATE_SHUTDOWN && !purespice_ready()) - { - PSStatus status; - if ((status = purespice_process(1000)) != PS_STATUS_RUN) - { - if (status != PS_STATUS_SHUTDOWN) - DEBUG_ERROR("Failed to process spice messages"); - goto end; - } - } - - // set the intial mouse mode - purespice_mouseMode(true); - // process all spice messages while(g_state.state != APP_STATE_SHUTDOWN) { @@ -1354,7 +1346,7 @@ static void lg_shutdown(void) } // if spice is still connected send key up events for any pressed keys - if (g_params.useSpiceInput && purespice_ready()) + if (g_params.useSpiceInput) { for(int scancode = 0; scancode < KEY_MAX; ++scancode) if (g_state.keyDown[scancode]) diff --git a/repos/PureSpice b/repos/PureSpice index 0015d910..427d6f34 160000 --- a/repos/PureSpice +++ b/repos/PureSpice @@ -1 +1 @@ -Subproject commit 0015d9108eff558bbe05e279d6aca7a9c256523b +Subproject commit 427d6f34d82d4a7a1de40218cc1c021314aa7d60