Mercurial > sdl-ios-xcode
comparison test/nds-test-progs/general/source/main.c @ 2692:cd8978f47849 gsoc2008_nds
Minor cleanups in renderer.
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Sat, 16 Aug 2008 11:16:08 +0000 |
parents | 87cfb5fde5db |
children | c1c7cb1b5a47 |
comparison
equal
deleted
inserted
replaced
2691:87cfb5fde5db | 2692:cd8978f47849 |
---|---|
26 if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0) { | 26 if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_JOYSTICK) < 0) { |
27 puts("# error initializing SDL"); | 27 puts("# error initializing SDL"); |
28 puts(SDL_GetError()); | 28 puts(SDL_GetError()); |
29 return 1; | 29 return 1; |
30 } | 30 } |
31 puts("* initialized SDL\n"); | 31 puts("* initialized SDL"); |
32 screen = SDL_SetVideoMode(256, 192, 15, SDL_SWSURFACE); | 32 screen = SDL_SetVideoMode(256, 192, 15, SDL_SWSURFACE); |
33 if(!screen) { | 33 if(!screen) { |
34 puts("# error setting video mode"); | 34 puts("# error setting video mode"); |
35 puts(SDL_GetError()); | 35 puts(SDL_GetError()); |
36 return 2; | 36 return 2; |
37 } | 37 } |
38 screen->flags &= ~SDL_PREALLOC; | 38 screen->flags &= ~SDL_PREALLOC; |
39 puts("* set video mode\n"); | 39 puts("* set video mode"); |
40 stick = SDL_JoystickOpen(0); | 40 stick = SDL_JoystickOpen(0); |
41 if(stick == NULL) { | 41 if(stick == NULL) { |
42 puts("# error opening joystick"); | 42 puts("# error opening joystick"); |
43 puts(SDL_GetError()); | 43 puts(SDL_GetError()); |
44 // return 3; | 44 // return 3; |