Implemented display aware glfwVideoModes function for X11 XRandR and win32.

This commit is contained in:
Marcel Metz
2011-10-02 16:13:47 -04:00
parent a905e671b3
commit 58d4323ece
8 changed files with 80 additions and 15 deletions
+5 -2
View File
@@ -51,6 +51,8 @@ _GLFWdisplay** _glfwCreateDisplay(_GLFWdisplay** current, XRROutputInfo* outputI
(*current)->screenXPosition = crtcInfo->x;
(*current)->screenYPosition = crtcInfo->y;
(*current)->X11.output = outputInfo;
return &((*current)->next);
}
@@ -60,6 +62,8 @@ _GLFWdisplay* _glfwDestroyDisplay(_GLFWdisplay* display)
result = display->next;
XRRFreeOutputInfo(display->X11.output);
_glfwFree(display);
return result;
@@ -105,10 +109,9 @@ void _glfwInitDisplays(void)
curDisplay = _glfwCreateDisplay(curDisplay, outputInfo, crtcInfo);
// Freeing of the outputInfo is done in _glfwDestroyDisplay
XRRFreeCrtcInfo(crtcInfo);
}
XRRFreeOutputInfo(outputInfo);
}
}
}