enable vsync by default for sdl3 backend, cleanup headers

This commit is contained in:
asrael 2025-10-18 08:48:14 -05:00
parent 9d183341ae
commit 865a2b4518
3 changed files with 9 additions and 6 deletions

View file

@ -57,6 +57,10 @@ static void* sdl3_create(pxl8_color_mode mode, pxl8_resolution resolution,
return NULL;
}
if (!SDL_SetRenderVSync(ctx->renderer, 1)) {
pxl8_error("Failed to enable vsync: %s", SDL_GetError());
}
SDL_SetRenderLogicalPresentation(ctx->renderer, fb_w, fb_h,
SDL_LOGICAL_PRESENTATION_INTEGER_SCALE);