From 05c6171c04df6f3747f1c9ab6e7b50ef3256ac03 Mon Sep 17 00:00:00 2001 From: C Stout Date: Fri, 20 Aug 2021 13:19:01 -0700 Subject: [PATCH] Fix error messages upon failure to connect to window systems. Change-Id: I650958a8b2607eb3402eb6531909881d4a2ccc0f --- cube/cube.c | 4 ++-- cube/cube.cpp | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cube/cube.c b/cube/cube.c index 0f50364..6bf8f4a 100644 --- a/cube/cube.c +++ b/cube/cube.c @@ -3925,7 +3925,7 @@ static void demo_init_connection(struct demo *demo) { demo->connection = xcb_connect(NULL, &scr); if (xcb_connection_has_error(demo->connection) > 0) { - printf("Cannot find a compatible Vulkan installable client driver (ICD).\nExiting ...\n"); + printf("Cannot connect to XCB.\nExiting ...\n"); fflush(stdout); exit(1); } @@ -3939,7 +3939,7 @@ static void demo_init_connection(struct demo *demo) { demo->display = wl_display_connect(NULL); if (demo->display == NULL) { - printf("Cannot find a compatible Vulkan installable client driver (ICD).\nExiting ...\n"); + printf("Cannot connect to wayland.\nExiting ...\n"); fflush(stdout); exit(1); } diff --git a/cube/cube.cpp b/cube/cube.cpp index ddbd1fc..7c83652 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp @@ -1065,9 +1065,7 @@ void Demo::init_connection() { connection = xcb_connect(nullptr, &scr); if (xcb_connection_has_error(connection) > 0) { - printf( - "Cannot find a compatible Vulkan installable client driver " - "(ICD).\nExiting ...\n"); + printf("Cannot connect to XCB.\nExiting ...\n"); fflush(stdout); exit(1); } @@ -1081,7 +1079,7 @@ void Demo::init_connection() { display = wl_display_connect(nullptr); if (display == nullptr) { - printf("Cannot find a compatible Vulkan installable client driver (ICD).\nExiting ...\n"); + printf("Cannot connect to wayland.\nExiting ...\n"); fflush(stdout); exit(1); } -- 2.7.4