Speed improvement of glfwGetVideoMode/s on X11

This commit is contained in:
Zeken 2014-09-10 11:13:13 +02:00
parent 41d998eb3c
commit a12ad231cc

View File

@ -339,7 +339,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
XRRCrtcInfo* ci; XRRCrtcInfo* ci;
XRROutputInfo* oi; XRROutputInfo* oi;
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root); sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc); ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output); oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
@ -394,7 +394,7 @@ void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
XRRScreenResources* sr; XRRScreenResources* sr;
XRRCrtcInfo* ci; XRRCrtcInfo* ci;
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root); sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc); ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
*mode = vidmodeFromModeInfo(getModeInfo(sr, ci->mode), ci); *mode = vidmodeFromModeInfo(getModeInfo(sr, ci->mode), ci);