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