[client] spice: wait 1 second before attempting to use spice video

This prevents the flash of spice display when it's not set to mirror
in the VM.
This commit is contained in:
Quantum 2022-09-18 23:12:42 -04:00 committed by Geoffrey McRae
parent b6f994b511
commit 646a725c0e

View File

@ -1016,11 +1016,6 @@ int spiceThread(void * arg)
#endif
};
/* use the spice display until we get frames from the LG host application
* it is safe to call this before connect as it will be delayed until
* spiceReady is called */
app_useSpiceDisplay(true);
if (!purespice_connect(&config))
{
DEBUG_ERROR("Failed to connect to spice server");
@ -1425,12 +1420,24 @@ restart:
msgsCount = 0;
memset(msgs, 0, sizeof(msgs));
uint64_t initialSpiceEnable = microtime() + 1000 * 1000;
while(g_state.state == APP_STATE_RUNNING)
{
if (initialSpiceEnable && microtime() > initialSpiceEnable)
{
/* use the spice display until we get frames from the LG host application
* it is safe to call this before connect as it will be delayed until
* spiceReady is called */
app_useSpiceDisplay(true);
initialSpiceEnable = 0;
}
status = lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata);
switch(status)
{
case LGMP_OK:
initialSpiceEnable = 0;
break;
case LGMP_ERR_INVALID_VERSION: