]> icculus.org git repositories - btb/d2x.git/blob - arch/sdl_init.c
Fixed build system, minor fixes
[btb/d2x.git] / arch / sdl_init.c
1 /*
2  * $Source: /cvs/cvsroot/d2x/arch/sdl_init.c,v $
3  * $Revision: 1.4 $
4  * $Author: bradleyb $
5  * $Date: 2001-01-29 13:35:09 $
6  *
7  * SDL architecture support
8  *
9  * $Log: not supported by cvs2svn $
10  */
11
12 #ifdef HAVE_CONFIG_H
13 #include <conf.h>
14 #endif
15
16 #include <stdlib.h>
17 #include <stdio.h>
18 #include <SDL/SDL.h>
19 #include "text.h"
20 #include "event.h"
21 #include "error.h"
22 #include "args.h"
23 #include "digi.h"
24
25 extern void d_mouse_init();
26
27 void sdl_close()
28 {
29         SDL_Quit();
30 }
31
32 void arch_sdl_init()
33 {
34  // Initialise the library
35 //edited on 01/03/99 by Matt Mueller - if we use SDL_INIT_EVERYTHING, cdrom is initialized even if -nocdaudio is used
36 #ifdef SDL_INPUT
37  if (!FindArg("-nomouse"))
38    d_mouse_init();
39 #endif
40  if (!FindArg("-nosound"))
41    digi_init();
42  atexit(sdl_close);
43 }