test/testime.c
changeset 3281 2d3a9f229ba1
parent 3280 00cace2d9080
child 3338 9de326b3099c
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);