force vsync
This commit is contained in:
parent
73a6e799bc
commit
8732124371
1 changed files with 7 additions and 0 deletions
7
main.c
7
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;
|
||||
|
|
Reference in a new issue