From d855abef4b3d0c1926397d4ffb8988c8434f3fd1 Mon Sep 17 00:00:00 2001 From: vitopigno <103512727+VitusVeit@users.noreply.github.com> Date: Mon, 21 Aug 2023 00:03:49 +0200 Subject: [PATCH] Update rcore.c --- src/rcore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index 52a58d6d6e28..02b459e69a2f 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -4470,13 +4470,16 @@ static bool InitGraphicsDevice(int width, int height) #endif // Try to enable GPU V-Sync, so frames are limited to screen refresh rate (60Hz -> 60 FPS) - // NOTE: V-Sync can be enabled by graphic driver configuration + // NOTE: V-Sync can be enabled by graphic driver configuration, it doesn't need + // to be activated on web platforms since VSync is enforced there. +#if !defined(PLATFORM_WEB) if (CORE.Window.flags & FLAG_VSYNC_HINT) { // WARNING: It seems to hit a critical render path in Intel HD Graphics glfwSwapInterval(1); TRACELOG(LOG_INFO, "DISPLAY: Trying to enable VSYNC"); } +#endif int fbWidth = CORE.Window.screen.width; int fbHeight = CORE.Window.screen.height;