From a12ad231cc18c96618c4d348fc6af273dfc6630a Mon Sep 17 00:00:00 2001 From: Zeken Date: Wed, 10 Sep 2014 11:13:13 +0200 Subject: [PATCH] Speed improvement of glfwGetVideoMode/s on X11 --- src/x11_monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11_monitor.c b/src/x11_monitor.c index 26f79cb60..f26fec402 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -339,7 +339,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) XRRCrtcInfo* ci; 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); oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output); @@ -394,7 +394,7 @@ void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) XRRScreenResources* sr; 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); *mode = vidmodeFromModeInfo(getModeInfo(sr, ci->mode), ci);