mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
Moved atexit call to shared code.
This commit is contained in:
+13
@@ -32,6 +32,17 @@
|
||||
#include "internal.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Terminate GLFW when exiting application
|
||||
//========================================================================
|
||||
|
||||
static void glfw_atexit(void)
|
||||
{
|
||||
glfwTerminate();
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -55,6 +66,8 @@ GLFWAPI int glfwInit(void)
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
atexit(glfw_atexit);
|
||||
|
||||
_glfwInitialized = GL_TRUE;
|
||||
|
||||
return GL_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user