explicitly deselect surfaces before using them in the runloop thread

This commit is contained in:
Martin Fouilleul 2023-06-23 15:38:13 +02:00
parent 472d3031b2
commit da2b0867a6
2 changed files with 4 additions and 5 deletions

@ -1 +1 @@
Subproject commit 83f128fb55c6eec7c8ac3e17e9926d6c740fe9e8
Subproject commit 18c793dbb4fac59facc1877fbb04ea889ef2b895

View File

@ -751,13 +751,12 @@ int main(int argc, char** argv)
mg_surface_set_hidden(app->debugOverlay.surface, true);
mg_surface dummy = mg_surface_create_for_window(app->window, MG_CANVAS);
mg_surface_destroy(dummy);
mg_surface_deselect();
//WARN: this is a workaround to avoid stalling the first few times we acquire drawables from
// the surfaces... This should probably be fixed in the implementation of mtl_surface!
/*
for(int i=0; i<4; i++)
//*
for(int i=0; i<3; i++)
{
mg_surface_prepare(app->surface);
mg_canvas_set_current(app->canvas);