mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Implemented display aware glfwVideoModes function for X11 XRandR and win32.
This commit is contained in:
+5
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user