mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Made monitor list cleanup shared.
This commit is contained in:
parent
01f9d0e32c
commit
6f970f5753
@ -387,5 +387,10 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
|||||||
GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig);
|
GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig);
|
||||||
GLboolean _glfwIsValidContext(_GLFWwindow* window, _GLFWwndconfig* wndconfig);
|
GLboolean _glfwIsValidContext(_GLFWwindow* window, _GLFWwndconfig* wndconfig);
|
||||||
|
|
||||||
|
// Monitor management (monitor.c)
|
||||||
|
void _glfwTerminateMonitors(void);
|
||||||
|
|
||||||
|
// platform specific (*_monitor.c)
|
||||||
|
_GLFWmonitor* _glfwDestroyMonitor(_GLFWmonitor* monitor);
|
||||||
|
|
||||||
#endif // _internal_h_
|
#endif // _internal_h_
|
||||||
|
@ -145,3 +145,13 @@ GLFWAPI void glfwSetMonitorDeviceCallback(GLFWmonitordevicefun cbfun)
|
|||||||
_glfwLibrary.monitorCallback= cbfun;
|
_glfwLibrary.monitorCallback= cbfun;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//========================================================================
|
||||||
|
// Delete the monitor list.
|
||||||
|
//========================================================================
|
||||||
|
|
||||||
|
void _glfwTerminateMonitors(void)
|
||||||
|
{
|
||||||
|
while (_glfwLibrary.monitorListHead)
|
||||||
|
_glfwLibrary.monitorListHead = _glfwDestroyMonitor(_glfwLibrary.monitorListHead);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -223,9 +223,3 @@ void _glfwRefreshMonitors(void)
|
|||||||
_glfwLibrary.monitorListHead = newMonitorList;
|
_glfwLibrary.monitorListHead = newMonitorList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwTerminateMonitors(void)
|
|
||||||
{
|
|
||||||
while (_glfwLibrary.monitorListHead)
|
|
||||||
_glfwLibrary.monitorListHead = _glfwDestroyMonitor(_glfwLibrary.monitorListHead);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -339,7 +339,6 @@ void _glfwInitTimer(void);
|
|||||||
// Monitor support
|
// Monitor support
|
||||||
void _glfwInitMonitors(void);
|
void _glfwInitMonitors(void);
|
||||||
void _glfwRefreshMonitors(void);
|
void _glfwRefreshMonitors(void);
|
||||||
void _glfwTerminateMonitors(void);
|
|
||||||
|
|
||||||
// Fullscreen support
|
// Fullscreen support
|
||||||
void _glfwSetVideoMode(int* width, int* height,
|
void _glfwSetVideoMode(int* width, int* height,
|
||||||
|
@ -128,9 +128,3 @@ void _glfwInitMonitors(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwTerminateMonitors(void)
|
|
||||||
{
|
|
||||||
while (_glfwLibrary.monitorListHead)
|
|
||||||
_glfwLibrary.monitorListHead = _glfwDestroyMonitor(_glfwLibrary.monitorListHead);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -281,7 +281,6 @@ void _glfwTerminateJoysticks(void);
|
|||||||
|
|
||||||
// Monitors
|
// Monitors
|
||||||
void _glfwInitMonitors(void);
|
void _glfwInitMonitors(void);
|
||||||
void _glfwTerminateMonitors(void);
|
|
||||||
|
|
||||||
// Unicode support
|
// Unicode support
|
||||||
long _glfwKeySym2Unicode(KeySym keysym);
|
long _glfwKeySym2Unicode(KeySym keysym);
|
||||||
|
Loading…
Reference in New Issue
Block a user