Ticket #3401: noxrandr.1.patch
File noxrandr.1.patch, 1.5 KB (added by , 17 years ago) |
---|
-
libs/libmyth/DisplayResX.cpp
52 52 desired_screen, rate); 53 53 if (idx >= 0) 54 54 { 55 Display *display = NULL; 56 XRRScreenConfiguration *cfg = GetScreenConfig(display); 55 Display *display = MythXOpenDisplay(); 56 if (!display) 57 return false; 58 XRRScreenConfiguration *cfg = NULL; 59 if (XRRQueryExtension(display,NULL,NULL)) 60 cfg = GetScreenConfig(display); 57 61 if (!cfg) 58 62 return false; 59 63 … … 82 86 if (m_video_modes.size()) 83 87 return m_video_modes; 84 88 85 Display *display = NULL; 86 XRRScreenConfiguration *cfg = GetScreenConfig(display); 89 Display *display = MythXOpenDisplay(); 90 if (!display) 91 return m_video_modes; 92 XRRScreenConfiguration *cfg = NULL; 93 if (XRRQueryExtension(display,NULL,NULL)) 94 cfg = GetScreenConfig(display); 87 95 if (!cfg) 88 96 return m_video_modes; 89 97 … … 121 129 122 130 X11L; 123 131 Window root = RootWindow(display, DefaultScreen(display)); 124 XRRScreenConfiguration *cfg = XRRGetScreenInfo(display, root); 132 XRRScreenConfiguration *cfg = NULL; 133 if (XRRQueryExtension(display,NULL,NULL)) 134 cfg = XRRGetScreenInfo(display, root); 125 135 if (!cfg) 126 136 { 127 137 if (display)