zenilib: zenilib/jni/external/sdl/src/haptic/dummy/SDL_syshaptic.c Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_syshaptic.c
Go to the documentation of this file.
1 /*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20 */
21 #include "SDL_config.h"
22
23 #if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED)
24
25 #include "SDL_haptic.h"
26 #include "../SDL_syshaptic.h"
27
28
29 static int
30 SDL_SYS_LogicError(void)
31 {
32 return SDL_SetError("Logic error: No haptic devices available.");
33 }
34
35
36 int
37 SDL_SYS_HapticInit(void)
38 {
39 return 0;
40 }
41
42
43 const char *
44 SDL_SYS_HapticName(int index)
45 {
46 SDL_SYS_LogicError();
47 return NULL;
48 }
49
50
51 int
52 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
53 {
54 return SDL_SYS_LogicError();
55 }
56
57
58 int
59 SDL_SYS_HapticMouse(void)
60 {
61 return -1;
62 }
63
64
65 int
66 SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
67 {
68 return 0;
69 }
70
71
72 int
73 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
74 {
75 return SDL_SYS_LogicError();
76 }
77
78
79 int
80 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
81 {
82 return 0;
83 }
84
85
86 void
87 SDL_SYS_HapticClose(SDL_Haptic * haptic)
88 {
89 return;
90 }
91
92
93 void
94 SDL_SYS_HapticQuit(void)
95 {
96 return;
97 }
98
99
100 int
101 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
102 struct haptic_effect *effect, SDL_HapticEffect * base)
103 {
104 return SDL_SYS_LogicError();
105 }
106
107
108 int
109 SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
110 struct haptic_effect *effect,
111 SDL_HapticEffect * data)
112 {
113 return SDL_SYS_LogicError();
114 }
115
116
117 int
118 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
119 Uint32 iterations)
120 {
121 return SDL_SYS_LogicError();
122 }
123
124
125 int
126 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
127 {
128 return SDL_SYS_LogicError();
129 }
130
131
132 void
133 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
134 {
135 SDL_SYS_LogicError();
136 return;
137 }
138
139
140 int
141 SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
142 struct haptic_effect *effect)
143 {
144 return SDL_SYS_LogicError();
145 }
146
147
148 int
149 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
150 {
151 return SDL_SYS_LogicError();
152 }
153
154
155 int
156 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
157 {
158 return SDL_SYS_LogicError();
159 }
160
161 int
162 SDL_SYS_HapticPause(SDL_Haptic * haptic)
163 {
164 return SDL_SYS_LogicError();
165 }
166
167 int
168 SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
169 {
170 return SDL_SYS_LogicError();
171 }
172
173 int
174 SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
175 {
176 return SDL_SYS_LogicError();
177 }
178
179 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */
SDL_SYS_HapticOpenFromJoystick
int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
NULL
#define NULL
Definition: ftobjs.h:61
SDL_SYS_HapticOpen
int SDL_SYS_HapticOpen(SDL_Haptic *haptic)
SDL_SYS_HapticMouse
int SDL_SYS_HapticMouse(void)
SDL_SYS_JoystickSameHaptic
int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
_SDL_Haptic
Definition: SDL_syshaptic.h:42
SDL_SYS_HapticStopEffect
int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
SDL_SYS_HapticName
const char * SDL_SYS_HapticName(int index)
SDL_haptic.h
The SDL Haptic subsystem allows you to control haptic (force feedback) devices.
SDL_SYS_HapticUnpause
int SDL_SYS_HapticUnpause(SDL_Haptic *haptic)
SDL_SYS_HapticGetEffectStatus
int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect)
SDL_config.h
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
SDL_HapticEffect
The generic template for any haptic effect.
Definition: SDL_haptic.h:787
SDL_SYS_HapticSetAutocenter
int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
haptic_effect
Definition: SDL_syshaptic.h:33
SDL_SetError
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
Definition: SDL_error.c:53
index
GLuint index
Definition: glew.h:1800
SDL_SYS_HapticUpdateEffect
int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data)
SDL_SYS_JoystickIsHaptic
int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick)
SDL_SYS_HapticDestroyEffect
void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
SDL_SYS_HapticInit
int SDL_SYS_HapticInit(void)
SDL_SYS_HapticQuit
void SDL_SYS_HapticQuit(void)
SDL_SYS_HapticClose
void SDL_SYS_HapticClose(SDL_Haptic *haptic)
SDL_SYS_HapticPause
int SDL_SYS_HapticPause(SDL_Haptic *haptic)
_SDL_Joystick
Definition: SDL_sysjoystick.h:29
SDL_SYS_HapticStopAll
int SDL_SYS_HapticStopAll(SDL_Haptic *haptic)
SDL_SYS_HapticSetGain
int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain)
SDL_SYS_HapticRunEffect
int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations)
SDL_SYS_HapticNewEffect
int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base)