mirror of
				https://github.com/gwm17/glfw.git
				synced 2025-11-03 18:01:20 -05:00 
			
		
		
		
	Handle case of no available CRTCs.
This commit is contained in:
		
							parent
							
								
									dd02b96c94
								
							
						
					
					
						commit
						5ed23e593c
					
				| 
						 | 
					@ -50,6 +50,8 @@ The following dependencies are needed by the examples and test programs:
 | 
				
			||||||
 - [Cocoa] Bugfix: Using a 1x1 cursor for hidden mode caused some screen
 | 
					 - [Cocoa] Bugfix: Using a 1x1 cursor for hidden mode caused some screen
 | 
				
			||||||
                   recorders to fail
 | 
					                   recorders to fail
 | 
				
			||||||
 - [X11] Bugfix: The case of finding no usable CRTCs was not detected
 | 
					 - [X11] Bugfix: The case of finding no usable CRTCs was not detected
 | 
				
			||||||
 | 
					 - [X11] Bugfix: Detection of broken Nvidia RandR gamma support did not verify
 | 
				
			||||||
 | 
					                 that at least one CRTC was present
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Contact
 | 
					## Contact
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,10 +43,12 @@ void _glfwInitGammaRamp(void)
 | 
				
			||||||
        XRRScreenResources* rr = XRRGetScreenResources(_glfw.x11.display,
 | 
					        XRRScreenResources* rr = XRRGetScreenResources(_glfw.x11.display,
 | 
				
			||||||
                                                       _glfw.x11.root);
 | 
					                                                       _glfw.x11.root);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (XRRGetCrtcGammaSize(_glfw.x11.display, rr->crtcs[0]) == 0)
 | 
					        if (!rr->ncrtc || !XRRGetCrtcGammaSize(_glfw.x11.display, rr->crtcs[0]))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // This is probably older Nvidia RandR with broken gamma support
 | 
					            // This is probably older Nvidia RandR with broken gamma support
 | 
				
			||||||
            // Flag it as useless and fall back to Xf86VidMode, if available
 | 
					            // Flag it as useless and fall back to Xf86VidMode, if available
 | 
				
			||||||
 | 
					            _glfwInputError(GLFW_PLATFORM_ERROR,
 | 
				
			||||||
 | 
					                            "X11: RandR gamma ramp support seems broken");
 | 
				
			||||||
            _glfw.x11.randr.gammaBroken = GL_TRUE;
 | 
					            _glfw.x11.randr.gammaBroken = GL_TRUE;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user