Avoid mode re-enumeration.

This commit is contained in:
Camilla Berglund 2013-06-07 13:57:17 +02:00
parent bfb7b053c2
commit f4387139e0

View File

@ -340,8 +340,11 @@ GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count)
_GLFW_REQUIRE_INIT_OR_RETURN(NULL); _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (monitor->modes == NULL)
{
if (!refreshVideoModes(monitor)) if (!refreshVideoModes(monitor))
return GL_FALSE; return GL_FALSE;
}
*count = monitor->modeCount; *count = monitor->modeCount;
return monitor->modes; return monitor->modes;