Message d'erreur pour l'initialisation de SDL.
This commit is contained in:
parent
96970c31c6
commit
05f706839a
2
Makefile
2
Makefile
|
@ -28,4 +28,4 @@ mrproper: clean
|
||||||
|
|
||||||
.Phony: test
|
.Phony: test
|
||||||
test: $(EXEC)
|
test: $(EXEC)
|
||||||
@./$(EXEC) || true
|
-./$(EXEC)
|
||||||
|
|
7
main.c
7
main.c
|
@ -1,8 +1,13 @@
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <SDL/SDL.h>
|
#include <SDL/SDL.h>
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user