[client] move startup later as DXGI stalls when nothing is going on

This commit is contained in:
Geoffrey McRae 2017-12-14 10:08:47 +11:00
parent 9d29b1195d
commit d8a80a1cfc

View File

@ -745,15 +745,6 @@ int run()
state.shmSize = ivshmem_get_map_size();
state.shm->hostID = ivshmem_get_id();
// flag the host that we are starting up this is important so that
// the host wakes up if it is waiting on an interrupt, the host will
// also send us the current mouse shape since we won't know it yet
DEBUG_INFO("Waiting for host to signal it's ready...");
__sync_or_and_fetch(&state.shm->flags, KVMFR_HEADER_FLAG_RESTART);
while(state.running && (state.shm->flags & KVMFR_HEADER_FLAG_RESTART))
usleep(1000);
DEBUG_INFO("Host ready, starting session");
if (params.useSpice)
{
if (!spice_connect(params.spiceHost, params.spicePort, ""))
@ -783,6 +774,15 @@ int run()
break;
}
// flag the host that we are starting up this is important so that
// the host wakes up if it is waiting on an interrupt, the host will
// also send us the current mouse shape since we won't know it yet
DEBUG_INFO("Waiting for host to signal it's ready...");
__sync_or_and_fetch(&state.shm->flags, KVMFR_HEADER_FLAG_RESTART);
while(state.running && (state.shm->flags & KVMFR_HEADER_FLAG_RESTART))
usleep(1000);
DEBUG_INFO("Host ready, starting session");
while(state.running)
renderThread(NULL);