diff --git a/tests/glfwinfo.c b/tests/glfwinfo.c index 99be17e7..74379c35 100644 --- a/tests/glfwinfo.c +++ b/tests/glfwinfo.c @@ -172,16 +172,8 @@ static void list_extensions(int api, int major, int minor) static GLboolean valid_version(void) { int major, minor, revision; - glfwGetVersion(&major, &minor, &revision); - printf("GLFW header version: %u.%u.%u\n", - GLFW_VERSION_MAJOR, - GLFW_VERSION_MINOR, - GLFW_VERSION_REVISION); - - printf("GLFW library version: %u.%u.%u\n", major, minor, revision); - if (major != GLFW_VERSION_MAJOR) { printf("*** ERROR: GLFW major version mismatch! ***\n"); @@ -191,10 +183,22 @@ static GLboolean valid_version(void) if (minor != GLFW_VERSION_MINOR || revision != GLFW_VERSION_REVISION) printf("*** WARNING: GLFW version mismatch! ***\n"); - printf("GLFW library version string: \"%s\"\n", glfwGetVersionString()); return GL_TRUE; } +static void print_version(void) +{ + int major, minor, revision; + glfwGetVersion(&major, &minor, &revision); + + printf("GLFW header version: %u.%u.%u\n", + GLFW_VERSION_MAJOR, + GLFW_VERSION_MINOR, + GLFW_VERSION_REVISION); + printf("GLFW library version: %u.%u.%u\n", major, minor, revision); + printf("GLFW library version string: \"%s\"\n", glfwGetVersionString()); +} + int main(int argc, char** argv) { int ch, api, major, minor, revision; @@ -328,6 +332,8 @@ int main(int argc, char** argv) } } + print_version(); + glfwWindowHint(GLFW_VISIBLE, GL_FALSE); window = glfwCreateWindow(200, 200, "Version", NULL, NULL);