mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] fix invalid shutdown of renderer outside of it's thread
This commit is contained in:
parent
fce88fc72c
commit
69522495de
@ -156,6 +156,9 @@ static int renderThread(void * unused)
|
|||||||
|
|
||||||
state.running = false;
|
state.running = false;
|
||||||
SDL_WaitThread(t_cursor, NULL);
|
SDL_WaitThread(t_cursor, NULL);
|
||||||
|
|
||||||
|
state.lgr->deinitialize(state.lgrData);
|
||||||
|
state.lgr = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1127,18 +1130,18 @@ int run()
|
|||||||
{
|
{
|
||||||
state.frameTime = 1e9 / (current.refresh_rate * 2);
|
state.frameTime = 1e9 / (current.refresh_rate * 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_WARN("Unable to capture monitor refresh rate using the default FPS Limit: 200");
|
DEBUG_WARN("Unable to capture monitor refresh rate using the default FPS Limit: 200");
|
||||||
state.frameTime = 1e9 / 200;
|
state.frameTime = 1e9 / 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_INFO("Using the FPS Limit from args: %d", params.fpsLimit);
|
DEBUG_INFO("Using the FPS Limit from args: %d", params.fpsLimit);
|
||||||
state.frameTime = 1e9 / params.fpsLimit;
|
state.frameTime = 1e9 / params.fpsLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
register_key_binds();
|
register_key_binds();
|
||||||
|
|
||||||
// set the compositor hint to bypass for low latency
|
// set the compositor hint to bypass for low latency
|
||||||
@ -1345,9 +1348,6 @@ int run()
|
|||||||
spice_disconnect();
|
spice_disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.lgr)
|
|
||||||
state.lgr->deinitialize(state.lgrData);
|
|
||||||
|
|
||||||
if (state.lgc)
|
if (state.lgc)
|
||||||
{
|
{
|
||||||
state.lgc->free();
|
state.lgc->free();
|
||||||
@ -1396,4 +1396,4 @@ int main(int argc, char * argv[])
|
|||||||
|
|
||||||
config_free();
|
config_free();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user