From e20e8f9954d97ee314498a2e127349dad0fc569e Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 14 May 2013 01:11:28 +0200 Subject: [PATCH] Comment fixes. --- src/monitor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/monitor.c b/src/monitor.c index 00c289a0..ce5f7a24 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -99,6 +99,8 @@ void _glfwInputMonitorChange(void) monitors = _glfwPlatformGetMonitors(&monitorCount); + // Re-use unchanged monitors and report new ones + for (i = 0; i < monitorCount; i++) { for (j = 0; j < _glfw.monitorCount; j++) @@ -125,6 +127,9 @@ void _glfwInputMonitorChange(void) } } + // The only monitors remaining in the global list are the disconnected ones + // Report them as disconnected + for (i = 0; i < _glfw.monitorCount; i++) { _GLFWwindow* window; @@ -132,7 +137,6 @@ void _glfwInputMonitorChange(void) if (_glfw.monitors[i] == NULL) continue; - // This monitor is no longer connected _glfw.monitorCallback((GLFWmonitor*) _glfw.monitors[i], GLFW_DISCONNECTED); for (window = _glfw.windowListHead; window; window = window->next)