Skip to content

Commit 5ed83df

Browse files
authored
Update rcore.c (#3255)
1 parent dfd0436 commit 5ed83df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rcore.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4470,13 +4470,16 @@ static bool InitGraphicsDevice(int width, int height)
44704470
#endif
44714471

44724472
// Try to enable GPU V-Sync, so frames are limited to screen refresh rate (60Hz -> 60 FPS)
4473-
// NOTE: V-Sync can be enabled by graphic driver configuration
4473+
// NOTE: V-Sync can be enabled by graphic driver configuration, it doesn't need
4474+
// to be activated on web platforms since VSync is enforced there.
4475+
#if !defined(PLATFORM_WEB)
44744476
if (CORE.Window.flags & FLAG_VSYNC_HINT)
44754477
{
44764478
// WARNING: It seems to hit a critical render path in Intel HD Graphics
44774479
glfwSwapInterval(1);
44784480
TRACELOG(LOG_INFO, "DISPLAY: Trying to enable VSYNC");
44794481
}
4482+
#endif
44804483

44814484
int fbWidth = CORE.Window.screen.width;
44824485
int fbHeight = CORE.Window.screen.height;

0 commit comments

Comments
 (0)