From 8732124371aad8d015d36a95c75bc6ea096c9ed8 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 3 May 2023 15:46:19 +0200 Subject: [PATCH] force vsync --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.c b/main.c index a1f5605..309f469 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,6 @@ +#include "SDL_error.h" +#include "SDL_video.h" #include "includes/animations.h" // Son de fond @@ -34,6 +36,11 @@ int main(int argc, char *argv[]) { atexit(closure); gl4duwDisplayFunc(gl4dhDraw); + + if (SDL_GL_SetSwapInterval(-1)) { + fprintf(stderr, "Erreur VSync : %s\n", SDL_GetError()); + } + gl4duwMainLoop(); return 0;