fixed return values in main
authorEleni Maria Stea <elene.mst@gmail.com>
Mon, 22 Nov 2021 07:52:45 +0000 (09:52 +0200)
committerEleni Maria Stea <elene.mst@gmail.com>
Mon, 22 Nov 2021 07:52:45 +0000 (09:52 +0200)
src/main.cc

index 6c3d70d..5ec96d4 100644 (file)
@@ -126,14 +126,14 @@ int main(int argc, char** argv)
 
     if (glfwVulkanSupported() != GLFW_TRUE) {
         fprintf(stderr, "Vulkan is not supported on this device.\n");
 
     if (glfwVulkanSupported() != GLFW_TRUE) {
         fprintf(stderr, "Vulkan is not supported on this device.\n");
-        return false;
+        return 1;
     }
 
     glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
     glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
     if (!(win = glfwCreateWindow(win_w, win_h, "helloworld rt", 0, 0))) {
         fprintf(stderr, "Failed to create GLFW window\n");
     }
 
     glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
     glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
     if (!(win = glfwCreateWindow(win_w, win_h, "helloworld rt", 0, 0))) {
         fprintf(stderr, "Failed to create GLFW window\n");
-        return false;
+        return 1;
     }
 
     glfwSetKeyCallback(win, clb_key);
     }
 
     glfwSetKeyCallback(win, clb_key);
@@ -147,7 +147,7 @@ int main(int argc, char** argv)
 
     if (!vk_init_ctx_for_rendering(&vk_core, true, vk_enable_layers)) {
         fprintf(stderr, "Failed to initialize Vulkan context.\n");
 
     if (!vk_init_ctx_for_rendering(&vk_core, true, vk_enable_layers)) {
         fprintf(stderr, "Failed to initialize Vulkan context.\n");
-        return false;
+        return 1;
     }
 
     /***********************************************************
     }
 
     /***********************************************************
@@ -158,7 +158,7 @@ int main(int argc, char** argv)
     if (glfwCreateWindowSurface(vk_core.inst, win, 0, &vk_surf)
             != VK_SUCCESS) {
         fprintf(stderr, "Failed to create XCB surface.\n");
     if (glfwCreateWindowSurface(vk_core.inst, win, 0, &vk_surf)
             != VK_SUCCESS) {
         fprintf(stderr, "Failed to create XCB surface.\n");
-        return false;
+        return 1;
     }
 
     /***********************************************************
     }
 
     /***********************************************************