mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Avoid mode re-enumeration.
This commit is contained in:
+5
-2
@@ -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 (!refreshVideoModes(monitor))
|
if (monitor->modes == NULL)
|
||||||
return GL_FALSE;
|
{
|
||||||
|
if (!refreshVideoModes(monitor))
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
*count = monitor->modeCount;
|
*count = monitor->modeCount;
|
||||||
return monitor->modes;
|
return monitor->modes;
|
||||||
|
|||||||
Reference in New Issue
Block a user