Recent Changes - Search:

Site.SideBar

SDLQuitTestApp

#include<SDL.h>

void wait(int timeticks) {
  timeticks = SDL_GetTicks() + timeticks;
  while (SDL_GetTicks() < timeticks);
}

main() {
  Uint32 flags = SDL_SWSURFACE;
  SDL_Surface *screen;

  if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) {
    printf("error\n");
  }
  screen = SDL_SetVideoMode(640, 480, 16, flags);
  wait(3000);
  printf("Quitting\n");

  SDL_Quit();
}
//gcc main.c `sdl-config --libs --cflags`
Edit - History - Print - Recent Changes - Search
Page last modified on January 10, 2012, at 01:16 AM