comparison test/testime.c @ 3281:2d3a9f229ba1

I'm gussing that this was never compiled where TTF support was missing. As a result a call to SDL_GetError and a call to TTF_GetError were swapped. I "fixed" it. That is it now compiles.
author Bob Pendleton <bob@pendleton.com>
date Sat, 19 Sep 2009 15:22:33 +0000
parents 00cace2d9080
children 9de326b3099c
comparison
equal deleted inserted replaced
3280:00cace2d9080 3281:2d3a9f229ba1
57 } 57 }
58 58
59 SDL_putenv("SDL_VIDEO_WINDOW_POS=center"); 59 SDL_putenv("SDL_VIDEO_WINDOW_POS=center");
60 if (SDL_Init(SDL_INIT_VIDEO) < 0) 60 if (SDL_Init(SDL_INIT_VIDEO) < 0)
61 { 61 {
62 fprintf(stderr, "Unable to init SDL: %s\n", TTF_GetError()); 62 fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
63 exit(-1); 63 exit(-1);
64 } 64 }
65 65
66 #ifdef HAVE_SDL_TTF 66 #ifdef HAVE_SDL_TTF
67 /* Initialize fonts */ 67 /* Initialize fonts */
68 TTF_Init(); 68 TTF_Init();
69 69
70 font = TTF_OpenFont(fontname, DEFAULT_PTSIZE); 70 font = TTF_OpenFont(fontname, DEFAULT_PTSIZE);
71 if (! font) 71 if (! font)
72 { 72 {
73 fprintf(stderr, "Failed to find font: %s\n", SDL_GetError()); 73 fprintf(stderr, "Failed to find font: %s\n", TTF_GetError());
74 exit(-1); 74 exit(-1);
75 } 75 }
76 #endif 76 #endif
77 77
78 printf("Using font: %s\n", fontname); 78 printf("Using font: %s\n", fontname);