comparison src/haptic/dummy/SDL_syshaptic.c @ 2713:0906692aa6a4

Final merge of Google Summer of Code 2008 work... Force Feedback for SDL by Edgar Simo, mentored by Ryan C. Gordon
author Sam Lantinga <slouken@libsdl.org>
date Mon, 25 Aug 2008 09:55:03 +0000
parents
children eed1bde05821
comparison
equal deleted inserted replaced
2712:c4e697245676 2713:0906692aa6a4
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 2008 Edgar Simo
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19 Sam Lantinga
20 slouken@libsdl.org
21 */
22 #include "SDL_config.h"
23
24 #if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED)
25
26 #include "SDL_haptic.h"
27 #include "../SDL_syshaptic.h"
28
29
30 static int
31 SDL_SYS_LogicError(void)
32 {
33 SDL_SetError("Logic error: No haptic devices available.");;
34 }
35
36
37 int
38 SDL_SYS_HapticInit(void)
39 {
40 return 0;
41 }
42
43
44 const char *
45 SDL_SYS_HapticName(int index)
46 {
47 SDL_SYS_LogicError();
48 return NULL;
49 }
50
51
52 int
53 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
54 {
55 SDL_SYS_LogicError();
56 return -1;
57 }
58
59
60 int
61 SDL_SYS_HapticMouse(void)
62 {
63 return -1;
64 }
65
66
67 int
68 SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
69 {
70 return 0;
71 }
72
73
74 int
75 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
76 {
77 SDL_SYS_LogicError();
78 return -1;
79 }
80
81
82 int
83 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
84 {
85 return 0;
86 }
87
88
89 void
90 SDL_SYS_HapticClose(SDL_Haptic * haptic)
91 {
92 return;
93 }
94
95
96 void
97 SDL_SYS_HapticQuit(void)
98 {
99 return;
100 }
101
102
103 int
104 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
105 struct haptic_effect *effect, SDL_HapticEffect * base)
106 {
107 SDL_SYS_LogicError();
108 return -1;
109 }
110
111
112 int
113 SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
114 struct haptic_effect *effect,
115 SDL_HapticEffect * data)
116 {
117 SDL_SYS_LogicError();
118 return -1;
119 }
120
121
122 int
123 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
124 Uint32 iterations)
125 {
126 SDL_SYS_LogicError();
127 return -1;
128 }
129
130
131 int
132 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
133 {
134 SDL_SYS_LogicError();
135 return -1;
136 }
137
138
139 void
140 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
141 {
142 SDL_SYS_LogicError();
143 return;
144 }
145
146
147 int
148 SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
149 struct haptic_effect *effect)
150 {
151 SDL_SYS_LogicError();
152 return -1;
153 }
154
155
156 int
157 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
158 {
159 SDL_SYS_LogicError();
160 return -1;
161 }
162
163
164 int
165 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
166 {
167 SDL_SYS_LogicError();
168 return -1;
169 }
170
171 int
172 SDL_SYS_HapticPause(SDL_Haptic * haptic)
173 {
174 SDL_SYS_LogicError();
175 return -1;
176 }
177
178 int
179 SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
180 {
181 SDL_SYS_LogicError();
182 return -1;
183 }
184
185 int
186 SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
187 {
188 SDL_SYS_LogicError();
189 return -1;
190 }
191
192
193
194 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */