Make passing layer shell config to glfw not use a global variable

This commit is contained in:
Kovid Goyal
2025-04-22 10:45:28 +05:30
parent 64ddd2cd04
commit 5e2d44ce15
10 changed files with 25 additions and 55 deletions

8
glfw/window.c vendored
View File

@@ -187,11 +187,7 @@ void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor)
////// GLFW public API //////
//////////////////////////////////////////////////////////////////////////
GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
const char* title,
GLFWmonitor* monitor,
GLFWwindow* share)
{
GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share, const GLFWLayerShellConfig *lsc) {
_GLFWfbconfig fbconfig;
_GLFWctxconfig ctxconfig;
_GLFWwndconfig wndconfig;
@@ -256,7 +252,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
window->heightincr = GLFW_DONT_CARE;
// Open the actual window and create its context
if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig))
if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig, lsc))
{
glfwDestroyWindow((GLFWwindow*) window);
return NULL;