Message d'erreur pour l'initialisation de SDL.

This commit is contained in:
Georges Dupéron 2010-09-26 01:07:31 +02:00
parent 96970c31c6
commit 05f706839a
2 changed files with 7 additions and 2 deletions

View File

@ -28,4 +28,4 @@ mrproper: clean
.Phony: test
test: $(EXEC)
@./$(EXEC) || true
-./$(EXEC)

7
main.c
View File

@ -1,8 +1,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
int main(int argc, char** argv) {
SDL_Init(SDL_INIT_VIDEO);
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
fprintf(stderr, "Erreur à l'initialisation de SDL :");
fprintf(stderr, " %s", SDL_GetError());
exit(EXIT_FAILURE);
}