mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 23:43:15 +00:00
Cleanup.
This commit is contained in:
@@ -130,6 +130,13 @@ GLFWAPI int glfwInit(void)
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
_glfwLibrary.monitors = _glfwPlatformGetMonitors(&_glfwLibrary.monitorCount);
|
||||
if (!_glfwLibrary.monitors)
|
||||
{
|
||||
_glfwPlatformTerminate();
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
atexit(glfwTerminate);
|
||||
|
||||
_glfwInitialized = GL_TRUE;
|
||||
@@ -151,6 +158,8 @@ GLFWAPI void glfwTerminate(void)
|
||||
while (_glfwLibrary.windowListHead)
|
||||
glfwDestroyWindow(_glfwLibrary.windowListHead);
|
||||
|
||||
_glfwDestroyMonitors();
|
||||
|
||||
if (!_glfwPlatformTerminate())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user