opengl: default to vsync=0 everywhere.

This reverts commit 3ee29f2e7a, among other
changes. This means getting a scary warning on the javascript console in
Emscripten by default, but this is easily fixed by setting a GL swap
interval at startup or creating a 2D renderer with the appropriate property
(or call to SDL_SetRenderVSync()).

Fixes #14625.
This commit is contained in:
Ryan C. Gordon
2025-12-08 15:12:06 -05:00
parent a296c40867
commit b3cdeb942a
2 changed files with 3 additions and 11 deletions

View File

@@ -1107,8 +1107,8 @@ SDL_GLContext SDL_EGL_CreateContext(SDL_VideoDevice *_this, EGLSurface egl_surfa
return NULL;
}
// The default swap interval is 1, according to the spec
_this->egl_data->egl_swapinterval = 1;
// The default swap interval is 1, according to the spec, but SDL3's policy is to default vsync to off by default.
_this->egl_data->egl_swapinterval = 0;
if (!SDL_EGL_MakeCurrent(_this, egl_surface, (SDL_GLContext)egl_context)) {
// Delete the context