mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] ds: add stopWaitFrame to terminate waitFrame early
This is used on exit to unblock the render thread.
This commit is contained in:
parent
695b7b793c
commit
f64310320a
@ -156,6 +156,9 @@ struct LG_DisplayServerOps
|
||||
/* This must be called when waitFrame returns, but no frame is actually rendered. */
|
||||
void (*skipFrame)(void);
|
||||
|
||||
/* This is used to interrupt waitFrame. */
|
||||
void (*stopWaitFrame)(void);
|
||||
|
||||
/* dm specific cursor implementations */
|
||||
void (*guestPointerUpdated)(double x, double y, double localX, double localY);
|
||||
void (*setPointer)(LG_DSPointer pointer);
|
||||
@ -228,6 +231,7 @@ struct LG_DisplayServerOps
|
||||
ASSERT_OPENGL_FN((x)->glMakeCurrent ); \
|
||||
ASSERT_OPENGL_FN((x)->glSetSwapInterval); \
|
||||
ASSERT_OPENGL_FN((x)->glSwapBuffers ); \
|
||||
assert(!(x)->waitFrame == !(x)->stopWaitFrame); \
|
||||
assert((x)->guestPointerUpdated); \
|
||||
assert((x)->setPointer ); \
|
||||
assert((x)->grabPointer ); \
|
||||
|
@ -1163,6 +1163,8 @@ static void lg_shutdown(void)
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
if (t_render)
|
||||
{
|
||||
if (g_state.ds->stopWaitFrame)
|
||||
g_state.ds->stopWaitFrame();
|
||||
lgSignalEvent(e_startup);
|
||||
lgSignalEvent(g_state.frameEvent);
|
||||
lgJoinThread(t_render, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user