| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -102,6 +102,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    int size = 0, found = 0; | 
					 | 
					 | 
					 | 
					    int size = 0, found = 0; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _GLFWmonitor** monitors = NULL; | 
					 | 
					 | 
					 | 
					    _GLFWmonitor** monitors = NULL; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    DWORD adapterIndex = 0; | 
					 | 
					 | 
					 | 
					    DWORD adapterIndex = 0; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    int primaryIndex = 0; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    for (;;) | 
					 | 
					 | 
					 | 
					    for (;;) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    { | 
					 | 
					 | 
					 | 
					    { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -111,7 +112,6 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        DEVMODE settings; | 
					 | 
					 | 
					 | 
					        DEVMODE settings; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        char* name; | 
					 | 
					 | 
					 | 
					        char* name; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        HDC dc; | 
					 | 
					 | 
					 | 
					        HDC dc; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        GLboolean primary; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        ZeroMemory(&adapter, sizeof(DISPLAY_DEVICE)); | 
					 | 
					 | 
					 | 
					        ZeroMemory(&adapter, sizeof(DISPLAY_DEVICE)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        adapter.cb = sizeof(DISPLAY_DEVICE); | 
					 | 
					 | 
					 | 
					        adapter.cb = sizeof(DISPLAY_DEVICE); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -156,7 +156,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        EnumDisplayDevices(adapter.DeviceName, 0, &display, 0); | 
					 | 
					 | 
					 | 
					        EnumDisplayDevices(adapter.DeviceName, 0, &display, 0); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        dc = CreateDC(L"DISPLAY", display.DeviceString, NULL, NULL); | 
					 | 
					 | 
					 | 
					        dc = CreateDC(L"DISPLAY", display.DeviceString, NULL, NULL); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        primary = adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE; | 
					 | 
					 | 
					 | 
					        if (adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            primaryIndex = found; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        name = _glfwCreateUTF8FromWideString(display.DeviceString); | 
					 | 
					 | 
					 | 
					        name = _glfwCreateUTF8FromWideString(display.DeviceString); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!name) | 
					 | 
					 | 
					 | 
					        if (!name) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -165,7 +166,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return NULL; | 
					 | 
					 | 
					 | 
					            return NULL; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        monitors[found] = _glfwCreateMonitor(name, primary, | 
					 | 
					 | 
					 | 
					        monitors[found] = _glfwCreateMonitor(name, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                             GetDeviceCaps(dc, HORZSIZE), | 
					 | 
					 | 
					 | 
					                                             GetDeviceCaps(dc, HORZSIZE), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                             GetDeviceCaps(dc, VERTSIZE), | 
					 | 
					 | 
					 | 
					                                             GetDeviceCaps(dc, VERTSIZE), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                             settings.dmPosition.x, | 
					 | 
					 | 
					 | 
					                                             settings.dmPosition.x, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -184,6 +185,13 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        found++; | 
					 | 
					 | 
					 | 
					        found++; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    if (primaryIndex > 0) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        _GLFWmonitor* temp = monitors[0]; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        monitors[0] = monitors[primaryIndex]; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        monitors[primaryIndex] = temp; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    *count = found; | 
					 | 
					 | 
					 | 
					    *count = found; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return monitors; | 
					 | 
					 | 
					 | 
					    return monitors; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |