From f1c74aabe2ae5b942d18a6dc67af7d2efc6e5250 Mon Sep 17 00:00:00 2001 From: Ali Chraghi Date: Sat, 17 Sep 2022 13:27:06 +0430 Subject: [PATCH] glfw: don't reset hints after window creation Closes #201 --- libs/glfw/src/Window.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/glfw/src/Window.zig b/libs/glfw/src/Window.zig index 9ec7fc6e..3912317f 100644 --- a/libs/glfw/src/Window.zig +++ b/libs/glfw/src/Window.zig @@ -36,7 +36,7 @@ pub inline fn from(handle: *c.GLFWwindow) Window { /// @thread_safety This function must only be called from the main thread. /// /// see also: window_hints, glfw.Window.hint, glfw.Window.hintString -inline fn defaultHints() void { +pub inline fn defaultHints() void { internal_debug.assertInitialized(); c.glfwDefaultWindowHints(); getError() catch |err| return switch (err) { @@ -389,7 +389,6 @@ pub inline fn create( internal_debug.assertInitialized(); const ignore_hints_struct = if (comptime @import("builtin").is_test) testing_ignore_window_hints_struct else false; if (!ignore_hints_struct) hints.set(); - defer if (!ignore_hints_struct) defaultHints(); if (c.glfwCreateWindow( @intCast(c_int, width),