From bdd774fd5031abb4b51a00334f03ddb67802070f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Sun, 16 Oct 2022 13:13:04 +0200 Subject: [PATCH] enable vsync on desktop --- code/foundation/src/platform/arch.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/foundation/src/platform/arch.h b/code/foundation/src/platform/arch.h index 7fe5552..19f459e 100644 --- a/code/foundation/src/platform/arch.h +++ b/code/foundation/src/platform/arch.h @@ -67,7 +67,11 @@ void platform_create_window(const char *title) { #endif InitWindow(screenWidth, screenHeight, title); - SetWindowState(/*FLAG_WINDOW_UNDECORATED|*/FLAG_WINDOW_MAXIMIZED|FLAG_WINDOW_RESIZABLE|FLAG_MSAA_4X_HINT/* |FLAG_VSYNC_HINT */); + uint32_t flags = /*FLAG_WINDOW_UNDECORATED|*/FLAG_WINDOW_MAXIMIZED|FLAG_WINDOW_RESIZABLE|FLAG_MSAA_4X_HINT; + #if !defined(PLATFORM_WEB) + flags |= FLAG_VSYNC_HINT; + #endif + SetWindowState(flags); #if !defined(PLATFORM_WEB) screenWidth = (uint16_t)GetScreenWidth();