mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Fixed two multi-window bugs.
This commit is contained in:
parent
326d997c1c
commit
44acfaa0b1
@ -388,11 +388,11 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(window, 0, sizeof(_GLFWwindow));
|
||||
|
||||
window->next = _glfwLibrary.windowListHead;
|
||||
_glfwLibrary.windowListHead = window;
|
||||
|
||||
memset(window, 0, sizeof(_GLFWwindow));
|
||||
|
||||
// Set up desired framebuffer config
|
||||
fbconfig.redBits = Max(_glfwLibrary.hints.redBits, 0);
|
||||
fbconfig.greenBits = Max(_glfwLibrary.hints.greenBits, 0);
|
||||
@ -697,13 +697,13 @@ GLFWAPI void glfwCloseWindow(GLFWwindow window)
|
||||
|
||||
_glfwPlatformCloseWindow(window);
|
||||
|
||||
free(window);
|
||||
|
||||
prev = &_glfwLibrary.windowListHead;
|
||||
while (*prev != window)
|
||||
prev = &((*prev)->next);
|
||||
|
||||
*prev = window->next;
|
||||
|
||||
free(window);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user