From 74e1fc31b92b4f3e10fd785365e99e1c2499e4f4 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Mon, 17 Oct 2022 19:22:08 -0300 Subject: [PATCH] fix(opengl): properly control whether vsync is enabled --- src/platform.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform.zig b/src/platform.zig index 8bff49b..35752a0 100644 --- a/src/platform.zig +++ b/src/platform.zig @@ -65,7 +65,7 @@ pub const Gui = struct { if (SDL.SDL_GL_MakeCurrent(window, ctx) < 0) panic(); gl.load(ctx, Self.glGetProcAddress) catch @panic("gl.load failed"); - if (config.config().host.vsync) if (SDL.SDL_GL_SetSwapInterval(1) < 0) panic(); + if (SDL.SDL_GL_SetSwapInterval(@boolToInt(config.config().host.vsync)) < 0) panic(); const program_id = compileShaders();