[client] gracefully restart if the host application restarts

This commit is contained in:
Geoffrey McRae
2020-08-11 14:30:44 +10:00
parent 4619ddef5d
commit 74649ddb96
7 changed files with 53 additions and 4 deletions

View File

@@ -295,6 +295,12 @@ void opengl_deinitialize(void * opaque)
free(this);
}
void opengl_on_restart(void * opaque)
{
struct Inst * this = (struct Inst *)opaque;
this->waiting = true;
}
void opengl_on_resize(void * opaque, const int width, const int height, const LG_RendererRect destRect)
{
struct Inst * this = (struct Inst *)opaque;
@@ -823,6 +829,7 @@ const LG_Renderer LGR_OpenGL =
.create = opengl_create,
.initialize = opengl_initialize,
.deinitialize = opengl_deinitialize,
.on_restart = opengl_on_restart,
.on_resize = opengl_on_resize,
.on_mouse_shape = opengl_on_mouse_shape,
.on_mouse_event = opengl_on_mouse_event,