mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[client] main: fix race condition on usage of events
This commit is contained in:
parent
d1e421f8a8
commit
6384a8d006
1 changed files with 14 additions and 14 deletions
|
@ -1178,6 +1178,20 @@ static int lg_run(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
// setup the startup condition
|
||||
if (!(e_startup = lgCreateEvent(false, 0)))
|
||||
{
|
||||
DEBUG_ERROR("failed to create the startup event");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// setup the new frame event
|
||||
if (!(g_state.frameEvent = lgCreateEvent(!g_state.jitRender, 0)))
|
||||
{
|
||||
DEBUG_ERROR("failed to create the frame event");
|
||||
return -1;
|
||||
}
|
||||
|
||||
//setup the render command queue
|
||||
renderQueue_init();
|
||||
|
||||
|
@ -1290,20 +1304,6 @@ static int lg_run(void)
|
|||
|
||||
keybind_commonRegister();
|
||||
|
||||
// setup the startup condition
|
||||
if (!(e_startup = lgCreateEvent(false, 0)))
|
||||
{
|
||||
DEBUG_ERROR("failed to create the startup event");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// setup the new frame event
|
||||
if (!(g_state.frameEvent = lgCreateEvent(!g_state.jitRender, 0)))
|
||||
{
|
||||
DEBUG_ERROR("failed to create the frame event");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (g_state.jitRender)
|
||||
DEBUG_INFO("Using JIT render mode");
|
||||
|
||||
|
|
Loading…
Reference in a new issue