mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[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:
parent
b6f994b511
commit
646a725c0e
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user