force vsync

This commit is contained in:
Mylloon 2023-05-03 15:46:19 +02:00
parent 73a6e799bc
commit 8732124371
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

7
main.c
View file

@ -1,4 +1,6 @@
#include "SDL_error.h"
#include "SDL_video.h"
#include "includes/animations.h" #include "includes/animations.h"
// Son de fond // Son de fond
@ -34,6 +36,11 @@ int main(int argc, char *argv[]) {
atexit(closure); atexit(closure);
gl4duwDisplayFunc(gl4dhDraw); gl4duwDisplayFunc(gl4dhDraw);
if (SDL_GL_SetSwapInterval(-1)) {
fprintf(stderr, "Erreur VSync : %s\n", SDL_GetError());
}
gl4duwMainLoop(); gl4duwMainLoop();
return 0; return 0;