mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Monitor enumeration fixes.
This commit is contained in:
@@ -107,6 +107,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
|
||||
DWORD adapterIndex = 0;
|
||||
int primaryIndex = 0;
|
||||
|
||||
*count = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
DISPLAY_DEVICE adapter, display;
|
||||
@@ -152,6 +154,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
|
||||
_glfwDestroyMonitors(monitors, found);
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Failed to convert string to UTF-8");
|
||||
|
||||
free(monitors);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user