Enabling vsync.

This commit is contained in:
Ulysse Cura 2026-09-29 13:34:25 +02:00
parent 9b04988cfa
commit 825c768fab
2 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ inline int display_init(void)
return EXIT_FAILURE;
}
if(!SDL_SetRenderVSync(game.display.renderer, SDL_RENDERER_VSYNC_ADAPTIVE))
if(!SDL_SetRenderVSync(game.display.renderer, 1))
{
error_printf("Failed to activate adaptative vsync : %s", SDL_GetError());
return EXIT_FAILURE;

View File

@ -46,13 +46,13 @@ inline int display_init(void)
error_printf("Failed to create renderer : %s", SDL_GetError());
return EXIT_FAILURE;
}
/*
if(!SDL_SetRenderVSync(game.display.renderer, SDL_RENDERER_VSYNC_ADAPTIVE))
if(!SDL_SetRenderVSync(game.display.renderer, 1))
{
error_printf("Failed to activate adaptative vsync : %s", SDL_GetError());
return EXIT_FAILURE;
}
*/
if(!SDL_SetRenderDrawBlendMode(game.display.renderer, SDL_BLENDMODE_BLEND))
{
error_printf("Failed to set renderer draw blend mode : %s", SDL_GetError());