Patrick Rudolph siro@das-labor.org writes:
@@ -279,15 +279,34 @@ static int xrandr12_get_current_mode(void) return 0; }
- if (!resources->ncrtc || !(crtc_info = pXRRGetCrtcInfo( gdi_display, resources, resources->crtcs[0] )))
- if (!resources->ncrtc) { pXRRFreeScreenResources( resources ); wine_tsx11_unlock();
ERR("Failed to get CRTC info.\n");
}ERR("No CRTCs found.\n"); return 0;
- for(i=0;resources->ncrtc;i++)
- {
if (!(crtc_info = pXRRGetCrtcInfo( gdi_display, resources, resources->crtcs[i] )))
{
pXRRFreeScreenResources( resources );
wine_tsx11_unlock();
ERR("Failed to get CRTC info.\n");
return 0;
}
- /* verify that crtc i is active */
if((!crtc_info->mode) && (!crtc_info->width) && (!crtc_info->height))
if(i+1 < resources->ncrtc) /* crtc i is disabled, test for more crtcs */
pXRRFreeCrtcInfo( crtc_info );
else
break;
- else
break;
- }
This clearly needs a helper function.