From ac1871e29a3fb3380d5682f4d6115463e92f984e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 12 Mar 2014 18:41:57 +0100 Subject: connect to multiple connectors concurrently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blueshift_drm_c.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/blueshift_drm_c.c b/src/blueshift_drm_c.c index 7d3df42..121b689 100644 --- a/src/blueshift_drm_c.c +++ b/src/blueshift_drm_c.c @@ -589,11 +589,21 @@ int main(int argc, char** argv) } } } - - blueshift_drm_close_connector(card, connector_i); } } + for (card_i = 0; card_i < card_n; card_i++) + { + int card = *(cards + card_i); + int connector_n = blueshift_drm_connector_count(card); + int connector_i; + + for (connector_i = 0; connector_i < connector_n; connector_i++) + blueshift_drm_close_connector(card, connector_i); + + blueshift_drm_close_card(card); + } + blueshift_drm_close(); return 0; } -- cgit v1.2.3-70-g09d2