aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-01-08 01:48:23 +0100
committerdec05eba <dec05eba@protonmail.com>2024-01-08 01:48:23 +0100
commit2303e53175c8d471aa7e796fef8a652b6a467e20 (patch)
tree6d30c557d0552b0a193f9b956463e80c468f33c4
parent5490e519cfb52d1cbb63752cee277ae01cd9e3fb (diff)
nvidia: flush on swap buffer (__GL_MaxFramesAllowed=1)
-rw-r--r--src/mgl.c3
1 files changed, 1 insertions, 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 <stdbool.h>
#include <string.h>
#include <stdio.h>
-#ifndef NDEBUG
#include <stdlib.h>
-#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);