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.
On 30 July 2012 20:13, Alexandre Julliard julliard@winehq.org wrote:
This clearly needs a helper function.
I'm not sure if this really makes sense to begin with. CRTC 0 is supposed to be the primary display. With proper multihead support we'd be able to enumerate the other display as well, and change modes on them etc., but I suspect disabling the primary display isn't going to give very good results on native Windows either, except perhaps for applications that have multihead support themselves.