Skip to content

Commit

Permalink
Update rcore.c (#3255)
Browse files Browse the repository at this point in the history
  • Loading branch information
VitusVeit authored Aug 20, 2023
1 parent dfd0436 commit 5ed83df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ed83df

Please sign in to comment.