src/video/x11/SDL_x11modes.c
changeset 11454 f6b9e7bd038a
parent 11344 039ef928e200
child 11689 64ec7aae69e3
equal deleted inserted replaced
11453:a2424c89f53e 11454:f6b9e7bd038a
   394                     }
   394                     }
   395                 }
   395                 }
   396                 X11_XFree(pixmapformats);
   396                 X11_XFree(pixmapformats);
   397             }
   397             }
   398 
   398 
   399             res = X11_XRRGetScreenResources(dpy, RootWindow(dpy, screen));
   399             res = X11_XRRGetScreenResourcesCurrent(dpy, RootWindow(dpy, screen));
   400             if (!res) {
   400             if (!res || res->noutput == 0) {
   401                 continue;
   401                 if (res) {
       
   402                     X11_XRRFreeScreenResources(res);
       
   403                 }
       
   404 
       
   405                 res = X11_XRRGetScreenResources(dpy, RootWindow(dpy, screen));
       
   406                 if (!res) {
       
   407                     continue;
       
   408                 }
   402             }
   409             }
   403 
   410 
   404             for (output = 0; output < res->noutput; output++) {
   411             for (output = 0; output < res->noutput; output++) {
   405                 XRROutputInfo *output_info;
   412                 XRROutputInfo *output_info;
   406                 int display_x, display_y;
   413                 int display_x, display_y;