From da2b0867a61dce6fcb401e5e4d58179a6aa5a817 Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Fri, 23 Jun 2023 15:38:13 +0200 Subject: [PATCH] explicitly deselect surfaces before using them in the runloop thread --- milepost | 2 +- src/main.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/milepost b/milepost index 83f128f..18c793d 160000 --- a/milepost +++ b/milepost @@ -1 +1 @@ -Subproject commit 83f128fb55c6eec7c8ac3e17e9926d6c740fe9e8 +Subproject commit 18c793dbb4fac59facc1877fbb04ea889ef2b895 diff --git a/src/main.c b/src/main.c index 5961c65..133ba21 100644 --- a/src/main.c +++ b/src/main.c @@ -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);