mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +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
|
#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))
|
if (!purespice_connect(&config))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("Failed to connect to spice server");
|
DEBUG_ERROR("Failed to connect to spice server");
|
||||||
@ -1425,12 +1420,24 @@ restart:
|
|||||||
msgsCount = 0;
|
msgsCount = 0;
|
||||||
memset(msgs, 0, sizeof(msgs));
|
memset(msgs, 0, sizeof(msgs));
|
||||||
|
|
||||||
|
uint64_t initialSpiceEnable = microtime() + 1000 * 1000;
|
||||||
|
|
||||||
while(g_state.state == APP_STATE_RUNNING)
|
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);
|
status = lgmpClientSessionInit(g_state.lgmp, &udataSize, (uint8_t **)&udata);
|
||||||
switch(status)
|
switch(status)
|
||||||
{
|
{
|
||||||
case LGMP_OK:
|
case LGMP_OK:
|
||||||
|
initialSpiceEnable = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LGMP_ERR_INVALID_VERSION:
|
case LGMP_ERR_INVALID_VERSION:
|
||||||
|
Loading…
Reference in New Issue
Block a user