Moved glfwTerminate window closing to shared code.

This commit is contained in:
Camilla Berglund 2010-09-15 02:28:56 +02:00
parent 0d39fbec58
commit d7670cf906
3 changed files with 4 additions and 6 deletions

View File

@ -70,6 +70,10 @@ GLFWAPI void glfwTerminate(void)
if (!_glfwInitialized) if (!_glfwInitialized)
return; return;
// Close all remaining windows
while (_glfwLibrary.windowListHead)
glfwCloseWindow(_glfwLibrary.windowListHead);
if (!_glfwPlatformTerminate()) if (!_glfwPlatformTerminate())
return; return;

View File

@ -178,9 +178,6 @@ int _glfwPlatformInit(void)
int _glfwPlatformTerminate(void) int _glfwPlatformTerminate(void)
{ {
while (_glfwLibrary.windowListHead)
glfwCloseWindow(_glfwLibrary.windowListHead);
if (_glfwLibrary.Win32.classAtom) if (_glfwLibrary.Win32.classAtom)
{ {
UnregisterClass(_GLFW_WNDCLASSNAME, _glfwLibrary.Win32.instance); UnregisterClass(_GLFW_WNDCLASSNAME, _glfwLibrary.Win32.instance);

View File

@ -220,9 +220,6 @@ int _glfwPlatformInit(void)
int _glfwPlatformTerminate(void) int _glfwPlatformTerminate(void)
{ {
while (_glfwLibrary.windowListHead)
glfwCloseWindow(_glfwLibrary.windowListHead);
if (_glfwLibrary.X11.cursor) if (_glfwLibrary.X11.cursor)
{ {
XFreeCursor(_glfwLibrary.X11.display, _glfwLibrary.X11.cursor); XFreeCursor(_glfwLibrary.X11.display, _glfwLibrary.X11.cursor);