Monitor enumeration fixes.

This commit is contained in:
Camilla Berglund
2013-06-09 13:07:23 +02:00
parent c8166e58d3
commit 68b7ea86d2
4 changed files with 25 additions and 11 deletions
+4
View File
@@ -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;
}