mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Moved glfwTerminate window closing to shared code.
This commit is contained in:
parent
0d39fbec58
commit
d7670cf906
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user