This commit was generated by cvs2svn to compensate for changes in r5,
[btb/d2x.git] / arch / sdl_init.c
1 // SDL architecture support
2 #include <conf.h>
3 #ifdef __ENV_LINUX__
4 #include <stdlib.h>
5 #include <stdio.h>
6 #include <SDL/SDL.h>
7 #include "text.h"
8 #include "event.h"
9 #include "error.h"
10 #include "args.h"
11
12 extern void d_mouse_init();
13
14 void sdl_close()
15 {
16         SDL_Quit();
17 }
18
19 void arch_sdl_init()
20 {
21  // Initialise the library
22 //edited on 01/03/99 by Matt Mueller - if we use SDL_INIT_EVERYTHING, cdrom is initialized even if -nocdaudio is used
23 #ifdef SDL_INPUT
24  if (!args_find("-nomouse"))
25    d_mouse_init();
26 #endif
27  if (!args_find("-nosound"))
28    digi_init();
29  atexit(sdl_close);
30 }
31
32 #endif // __ENV_LINUX__