This commit is contained in:
Denis 2016-09-15 11:28:58 +00:00 committed by GitHub
commit deee330319
2 changed files with 19 additions and 3 deletions

View File

@ -653,6 +653,23 @@ void _glfwPlatformTerminate(void)
wl_display_flush(_glfw.wl.display);
if (_glfw.wl.display)
wl_display_disconnect(_glfw.wl.display);
if (_glfw.wl.monitors)
{
int i;
for (i = 0; i < _glfw.wl.monitorsCount; ++i)
{
if (_glfw.wl.monitors[i])
{
if (_glfw.wl.monitors[i]->wl.modes)
free(_glfw.wl.monitors[i]->wl.modes);
free(_glfw.wl.monitors[i]);
}
}
free(_glfw.wl.monitors);
}
xkb_context_unref(_glfw.wl.xkb.context);
}
const char* _glfwPlatformGetVersionString(void)

View File

@ -185,10 +185,9 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
_GLFWmonitor* origMonitor = _glfw.wl.monitors[i];
monitor = calloc(1, sizeof(_GLFWmonitor));
monitor->modes =
_glfwPlatformGetVideoModes(origMonitor,
&origMonitor->wl.modesCount);
*monitor = *_glfw.wl.monitors[i];
monitor->modes = _glfwPlatformGetVideoModes(origMonitor, &origMonitor->wl.modesCount);
monitor->modeCount = origMonitor->wl.modesCount;
monitors[i] = monitor;
}