Moved atexit call to shared code.

This commit is contained in:
Camilla Berglund
2010-09-16 04:11:06 +02:00
parent 1f704a2408
commit 3c85eef0bf
4 changed files with 13 additions and 39 deletions
+13
View File
@@ -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;