1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Use stdbool more consistently in glfwinfo

This commit is contained in:
Camilla Löwy 2020-06-28 21:23:17 +02:00
parent 1cecb8beb0
commit e6a6a99813

View File

@ -278,7 +278,7 @@ static void list_vulkan_device_layers(VkInstance instance, VkPhysicalDevice devi
free(lp); free(lp);
} }
static int valid_version(void) static bool valid_version(void)
{ {
int major, minor, revision; int major, minor, revision;
glfwGetVersion(&major, &minor, &revision); glfwGetVersion(&major, &minor, &revision);
@ -286,13 +286,13 @@ static int valid_version(void)
if (major != GLFW_VERSION_MAJOR) if (major != GLFW_VERSION_MAJOR)
{ {
printf("*** ERROR: GLFW major version mismatch! ***\n"); printf("*** ERROR: GLFW major version mismatch! ***\n");
return GLFW_FALSE; return false;
} }
if (minor != GLFW_VERSION_MINOR || revision != GLFW_VERSION_REVISION) if (minor != GLFW_VERSION_MINOR || revision != GLFW_VERSION_REVISION)
printf("*** WARNING: GLFW version mismatch! ***\n"); printf("*** WARNING: GLFW version mismatch! ***\n");
return GLFW_TRUE; return true;
} }
static void print_version(void) static void print_version(void)
@ -444,10 +444,10 @@ int main(int argc, char** argv)
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
case 'l': case 'l':
case EXTENSIONS: case EXTENSIONS:
list_extensions = GLFW_TRUE; list_extensions = true;
break; break;
case LAYERS: case LAYERS:
list_layers = GLFW_TRUE; list_layers = true;
break; break;
case 'm': case 'm':
case MAJOR: case MAJOR:
@ -585,14 +585,14 @@ int main(int argc, char** argv)
glfwSetErrorCallback(error_callback); glfwSetErrorCallback(error_callback);
glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE); glfwInitHint(GLFW_COCOA_MENUBAR, false);
if (!glfwInit()) if (!glfwInit())
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
print_version(); print_version();
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); glfwWindowHint(GLFW_VISIBLE, false);
glfwWindowHint(GLFW_CLIENT_API, client_api); glfwWindowHint(GLFW_CLIENT_API, client_api);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, context_major); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, context_major);