Activating adaptative vsync to limit rare frames stutter.
This commit is contained in:
parent
dd1aeae9f5
commit
dc0a1f3656
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue