This commit is contained in:
anttirt 2014-01-22 07:41:01 -08:00
commit 2cdd338207
2 changed files with 7 additions and 2 deletions

View File

@ -51,7 +51,11 @@ void _glfwInitGammaRamp(void)
XRRScreenResources* rr = XRRGetScreenResources(_glfw.x11.display,
_glfw.x11.root);
if (XRRGetCrtcGammaSize(_glfw.x11.display, rr->crtcs[0]) == 0)
if (rr->ncrtc == 0)
{
_glfw.x11.randr.gammaBroken = GL_TRUE;
}
else if (XRRGetCrtcGammaSize(_glfw.x11.display, rr->crtcs[0]) == 0)
{
// This is probably older Nvidia RandR with broken gamma support
// Flag it as useless and try Xf86VidMode below, if available

View File

@ -251,7 +251,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
*count = found;
}
else
if (monitors == NULL)
{
monitors = calloc(1, sizeof(_GLFWmonitor*));
monitors[0] = _glfwAllocMonitor("Display",