From 508e24c01c6169b26bdf3e1310449f19f1613087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 13 May 2021 21:38:46 +0200 Subject: [PATCH] Add tracking of single-/double-buffering This adds the state part of 04f21abb52e557addb932af1634b29658fd3a6ae (Make GLFW_DOUBLEBUFFER a window attribute), but without the associated API change, because this is needed by later bug fixes that will go into the stable branch. --- src/internal.h | 1 + src/window.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/internal.h b/src/internal.h index 2a5668af..b28e9424 100644 --- a/src/internal.h +++ b/src/internal.h @@ -375,6 +375,7 @@ struct _GLFWwindow GLFWbool focusOnShow; GLFWbool shouldClose; void* userPointer; + GLFWbool doublebuffer; GLFWvidmode videoMode; _GLFWmonitor* monitor; _GLFWcursor* cursor; diff --git a/src/window.c b/src/window.c index 44de03bb..b87a2609 100644 --- a/src/window.c +++ b/src/window.c @@ -205,6 +205,8 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, window->focusOnShow = wndconfig.focusOnShow; window->cursorMode = GLFW_CURSOR_NORMAL; + window->doublebuffer = fbconfig.doublebuffer; + window->minwidth = GLFW_DONT_CARE; window->minheight = GLFW_DONT_CARE; window->maxwidth = GLFW_DONT_CARE;