diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-01-08 01:48:23 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-01-08 01:48:23 +0100 |
commit | 2303e53175c8d471aa7e796fef8a652b6a467e20 (patch) | |
tree | 6d30c557d0552b0a193f9b956463e80c468f33c4 /src | |
parent | 5490e519cfb52d1cbb63752cee277ae01cd9e3fb (diff) |
nvidia: flush on swap buffer (__GL_MaxFramesAllowed=1)
Diffstat (limited to 'src')
-rw-r--r-- | src/mgl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); |