diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index c33a232099..3e519a2571 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -1238,16 +1238,8 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props) SDL_AddWindowEventWatch(SDL_WINDOW_EVENT_WATCH_NORMAL, SDL_RendererEventWatch, renderer); } -#ifdef SDL_PLATFORM_EMSCRIPTEN // don't change vsync on Emscripten unless explicitly requested; we already set this with a mainloop, and a 0 default causes problems here. - if (SDL_HasProperty(props, SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER)) { - const int vsync = (int)SDL_GetNumberProperty(props, SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, 0); - SDL_SetRenderVSync(renderer, vsync); - } -#else // everything else defaults to no vsync if not requested. - const int vsync = (int)SDL_GetNumberProperty(props, SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, 0); + int vsync = (int)SDL_GetNumberProperty(props, SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, 0); SDL_SetRenderVSync(renderer, vsync); -#endif - SDL_CalculateSimulatedVSyncInterval(renderer, window); SDL_LogInfo(SDL_LOG_CATEGORY_RENDER, diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c index 1c6a46384d..72b6d590c0 100644 --- a/src/video/SDL_egl.c +++ b/src/video/SDL_egl.c @@ -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