mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] main: fix race condition on usage of events
This commit is contained in:
parent
d1e421f8a8
commit
6384a8d006
@ -1178,6 +1178,20 @@ static int lg_run(void)
|
|||||||
return -1;
|
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
|
//setup the render command queue
|
||||||
renderQueue_init();
|
renderQueue_init();
|
||||||
|
|
||||||
@ -1290,20 +1304,6 @@ static int lg_run(void)
|
|||||||
|
|
||||||
keybind_commonRegister();
|
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)
|
if (g_state.jitRender)
|
||||||
DEBUG_INFO("Using JIT render mode");
|
DEBUG_INFO("Using JIT render mode");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user