Merge single-use function _glfwFreeMonitors

All other uses were elminiated by _glfwInputMonitor.
This commit is contained in:
Camilla Löwy 2017-01-10 15:01:55 +01:00
parent f29c963030
commit 48a795c101
3 changed files with 3 additions and 17 deletions

View File

@ -160,14 +160,14 @@ GLFWAPI void glfwTerminate(void)
_GLFWmonitor* monitor = _glfw.monitors[i];
if (monitor->originalRamp.size)
_glfwPlatformSetGammaRamp(monitor, &monitor->originalRamp);
_glfwFreeMonitor(monitor);
}
_glfwTerminateVulkan();
_glfwFreeMonitors(_glfw.monitors, _glfw.monitorCount);
free(_glfw.monitors);
_glfw.monitors = NULL;
_glfw.monitorCount = 0;
_glfwTerminateVulkan();
_glfwPlatformTerminate();
memset(&_glfw, 0, sizeof(_glfw));

View File

@ -1065,10 +1065,6 @@ _GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM);
*/
void _glfwFreeMonitor(_GLFWmonitor* monitor);
/*! @ingroup utility
*/
void _glfwFreeMonitors(_GLFWmonitor** monitors, int count);
/*! @ingroup utility
*/
GLFWbool _glfwIsPrintable(int key);

View File

@ -180,16 +180,6 @@ void _glfwFreeGammaArrays(GLFWgammaramp* ramp)
memset(ramp, 0, sizeof(GLFWgammaramp));
}
void _glfwFreeMonitors(_GLFWmonitor** monitors, int count)
{
int i;
for (i = 0; i < count; i++)
_glfwFreeMonitor(monitors[i]);
free(monitors);
}
const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor,
const GLFWvidmode* desired)
{