Merge pull request #83902 from Biokastin/master

Improve X11 `screen_get_refresh_rate` performance
This commit is contained in:
Rémi Verschelde 2023-10-25 10:32:21 +02:00
commit 06d5189167
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1571,7 +1571,7 @@ float DisplayServerX11::screen_get_refresh_rate(int p_screen) const {
//Use xrandr to get screen refresh rate.
if (xrandr_ext_ok) {
XRRScreenResources *screen_info = XRRGetScreenResources(x11_display, windows[MAIN_WINDOW_ID].x11_window);
XRRScreenResources *screen_info = XRRGetScreenResourcesCurrent(x11_display, windows[MAIN_WINDOW_ID].x11_window);
if (screen_info) {
RRMode current_mode = 0;
xrr_monitor_info *monitors = nullptr;