Added GLFW error strings to test programs, various tweaks.

This commit is contained in:
Camilla Berglund
2010-09-11 14:32:05 +02:00
parent a79a6eb82a
commit abaac3ea99
11 changed files with 38 additions and 34 deletions
+7 -1
View File
@@ -6,6 +6,7 @@
#include <GL/glfw3.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX_AXES 10
@@ -93,7 +94,12 @@ int main(void)
double update;
/* Initialise GLFW */
glfwInit();
if (!glfwInit())
{
fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
exit(EXIT_FAILURE);
}
printf("The program will work for 20 seconds and display every seconds the state of the joysticks\n");
printf("Your computer is going to be very slow as the program is doing an active loop .....\n");