Activating adaptative vsync to limit rare frames stutter.

This commit is contained in:
Ulysse Cura 2026-08-04 01:21:53 +02:00
parent dd1aeae9f5
commit dc0a1f3656
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,12 @@ inline int display_init(void)
return EXIT_FAILURE;
}
if(!SDL_SetRenderVSync(renderer, SDL_RENDERER_VSYNC_ADAPTIVE))
{
error_printf("Failed to activate adaptative vsync : %s", SDL_GetError());
return EXIT_FAILURE;
}
if(!SDL_SetRenderScale(renderer, RENDER_SCALE, RENDER_SCALE))
{
error_printf("Failed to set renderer scale presentation : %s", SDL_GetError());