]> icculus.org git repositories - btb/d2x.git/blob - input/sdl_joy.c
Moved arch/sdl_* to arch/sdl
[btb/d2x.git] / input / sdl_joy.c
1 /*
2  * $Source: /cvs/cvsroot/d2x/input/sdl_joy.c,v $
3  * $Revision: 1.1 $
4  * $Author: bradleyb $
5  * $Date: 2001-10-10 03:01:29 $
6  *
7  * SDL joystick support
8  *
9  * $Log: not supported by cvs2svn $
10  *
11  */
12
13 #ifdef HAVE_CONFIG_H
14 #include <conf.h>
15 #endif
16
17 #include <SDL/SDL.h>
18
19 #include "joy.h"
20 #include "error.h"
21
22 char joy_present = 0;
23
24 int
25 joy_init()
26 {
27   if (SDL_Init( SDL_INIT_JOYSTICK ) < 0)
28     {
29       Warning("SDL library initialisation failed: %s.", SDL_GetError());
30       return 0;
31     }
32
33
34
35   return 1;
36 }
37
38 void
39 joy_close()
40 {
41   return;
42 }
43
44 void
45 joy_get_pos(int *x, int *y)
46 {
47   *x = *y = 0;
48   return;
49 }
50
51 int
52 joy_get_btns()
53 {
54   return 0;
55 }
56
57 int
58 joy_get_button_down_cnt(int btn)
59 {
60   return 0;
61 }
62
63 fix
64 joy_get_button_down_time(int btn)
65 {
66   return 0;
67 }
68
69 ubyte
70 joystick_read_raw_axis(ubyte mask, int *axis)
71 {
72   return 0;
73 }
74
75 void
76 joy_flush()
77 {
78   return;
79 }
80
81 int
82 joy_get_button_state(int btn)
83 {
84   return 0;
85 }
86
87 void
88 joy_get_cal_vals(int *axis_min, int *axis_center, int *axis_max)
89 {
90   return;
91 }
92
93 void
94 joy_set_cal_vals(int *axis_min, int *axis_center, int *axis_max)
95 {
96   return;
97 }
98
99 int
100 joy_get_scaled_reading(int raw, int axn)
101 {
102   return 0;
103 }
104
105 void
106 joy_set_slow_reading(int flag)
107 {
108   return;
109 }