From 2303e53175c8d471aa7e796fef8a652b6a467e20 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 8 Jan 2024 01:48:23 +0100 Subject: nvidia: flush on swap buffer (__GL_MaxFramesAllowed=1) --- src/mgl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mgl.c b/src/mgl.c index 08cd9f8..16379e0 100644 --- a/src/mgl.c +++ b/src/mgl.c @@ -6,9 +6,7 @@ #include #include #include -#ifndef NDEBUG #include -#endif static mgl_context context; static int init_count = 0; @@ -57,6 +55,7 @@ static bool xrandr_is_supported(Display *display, int *event_base, int *error_ba int mgl_init(void) { ++init_count; if(init_count == 1) { + setenv("__GL_MaxFramesAllowed", "1", true); memset(&context, 0, sizeof(context)); context.connection = XOpenDisplay(NULL); -- cgit v1.2.3