From 21846e2396881c028613aec0ac4e75ae167d66d8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 24 May 2014 02:35:56 +0200 Subject: gamma-x-randr: crtc info: jump if the output information is not required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/gamma-x-randr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gamma-x-randr.c b/src/gamma-x-randr.c index c5f60dd..0d831c9 100644 --- a/src/gamma-x-randr.c +++ b/src/gamma-x-randr.c @@ -488,6 +488,10 @@ int libgamma_x_randr_get_crtc_information(libgamma_crtc_information_t* restrict if ((fields & (CRTC_INFO_WIDTH_MM | CRTC_INFO_HEIGHT_MM | CRTC_INFO_SUBPIXEL_ORDER))) fields |= CRTC_INFO_ACTIVE; + /* Jump if the output information is not required. */ + if ((fields & (CRTC_INFO_ACTIVE | CRTC_INFO_CONNECTOR_NAME)) == 0) + goto cont; + /* FIXME output */ e |= this->connector_name_error = -1; /* FIXME */ -- cgit v1.2.3-70-g09d2