compositor-drm: Check for OUTPUT_CONFIG_OFF instead of using strcmp()
authorAnder Conselvan de Oliveira <conselvan2@gmail.com>
Thu, 9 Aug 2012 13:45:01 +0000 (16:45 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 9 Aug 2012 18:39:13 +0000 (14:39 -0400)
A call to strcmp() is already made in output_section_done() and
output->config is set appropriately if mode is "off". There is
no need to duplicate that in create_output_for_connector().

src/compositor-drm.c

index e3cf134..01e72fe 100644 (file)
@@ -1409,7 +1409,7 @@ create_output_for_connector(struct drm_compositor *ec,
                }
        }
 
-       if (o && strcmp("off", o->mode) == 0) {
+       if (o && o->config == OUTPUT_CONFIG_OFF) {
                weston_log("Disabling output %s\n", o->name);
 
                drmModeSetCrtc(ec->drm.fd, output->crtc_id,