From 972c31a4d7a7786af5f1e3302c7c3035ec911cb2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 23 May 2014 18:54:35 +0200 Subject: gamma-x-randr: crtc init 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gamma-x-randr.c b/src/gamma-x-randr.c index 95e8fdc..36be77a 100644 --- a/src/gamma-x-randr.c +++ b/src/gamma-x-randr.c @@ -297,7 +297,11 @@ int libgamma_x_randr_partition_restore(libgamma_partition_state_t* restrict this int libgamma_x_randr_crtc_initialise(libgamma_crtc_state_t* restrict this, libgamma_partition_state_t* restrict partition, size_t crtc) { - /* TODO */ + xcb_randr_crtc_t* crtc_ids = partition->data; + if (crtc >= partition->crtcs_available) + return LIBGAMMA_NO_SUCH_CRTC; + this->data = crtc_ids + crtc; + return 0; } -- cgit v1.2.3-70-g09d2