Cleanup logic in xf86PrepareOutputs

Should have done this in the first place.  Since we're checking for the absence
of the get_crtc callback in the first place, we'll short circuit the later call
and disable the output, so the ugly "continue" block is unnecesary.
This commit is contained in:
Jesse Barnes 2008-03-17 14:55:44 -07:00
parent ba85caacb5
commit afd7428690

View File

@ -2047,13 +2047,9 @@ xf86PrepareOutputs (ScrnInfoPtr scrn)
for (o = 0; o < config->num_output; o++) {
xf86OutputPtr output = config->output[o];
#if RANDR_GET_CRTC_INTERFACE
/* If we can't get the current CRTC, play it safe */
if (!output->funcs->get_crtc) {
(*output->funcs->dpms)(output, DPMSModeOff);
continue;
}
/* Disable outputs that are unused or will be re-routed */
if (output->crtc != (*output->funcs->get_crtc)(output) ||
if (!output->funcs->get_crtc ||
output->crtc != (*output->funcs->get_crtc)(output) ||
output->crtc == NULL)
#endif
(*output->funcs->dpms)(output, DPMSModeOff);