mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 03:52:01 +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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(window, 0, sizeof(_GLFWwindow));
|
||||||
|
|
||||||
window->next = _glfwLibrary.windowListHead;
|
window->next = _glfwLibrary.windowListHead;
|
||||||
_glfwLibrary.windowListHead = window;
|
_glfwLibrary.windowListHead = window;
|
||||||
|
|
||||||
memset(window, 0, sizeof(_GLFWwindow));
|
|
||||||
|
|
||||||
// Set up desired framebuffer config
|
// Set up desired framebuffer config
|
||||||
fbconfig.redBits = Max(_glfwLibrary.hints.redBits, 0);
|
fbconfig.redBits = Max(_glfwLibrary.hints.redBits, 0);
|
||||||
fbconfig.greenBits = Max(_glfwLibrary.hints.greenBits, 0);
|
fbconfig.greenBits = Max(_glfwLibrary.hints.greenBits, 0);
|
||||||
@ -697,13 +697,13 @@ GLFWAPI void glfwCloseWindow(GLFWwindow window)
|
|||||||
|
|
||||||
_glfwPlatformCloseWindow(window);
|
_glfwPlatformCloseWindow(window);
|
||||||
|
|
||||||
free(window);
|
|
||||||
|
|
||||||
prev = &_glfwLibrary.windowListHead;
|
prev = &_glfwLibrary.windowListHead;
|
||||||
while (*prev != window)
|
while (*prev != window)
|
||||||
prev = &((*prev)->next);
|
prev = &((*prev)->next);
|
||||||
|
|
||||||
*prev = window->next;
|
*prev = window->next;
|
||||||
|
|
||||||
|
free(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user