zenilib  0.5.3.0
 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
38 {
39  return 0;
40 }
41 
42 
43 const char *
45 {
46  SDL_SYS_LogicError();
47  return NULL;
48 }
49 
50 
51 int
53 {
54  return SDL_SYS_LogicError();
55 }
56 
57 
58 int
60 {
61  return -1;
62 }
63 
64 
65 int
67 {
68  return 0;
69 }
70 
71 
72 int
74 {
75  return SDL_SYS_LogicError();
76 }
77 
78 
79 int
81 {
82  return 0;
83 }
84 
85 
86 void
88 {
89  return;
90 }
91 
92 
93 void
95 {
96  return;
97 }
98 
99 
100 int
102  struct haptic_effect *effect, SDL_HapticEffect * base)
103 {
104  return SDL_SYS_LogicError();
105 }
106 
107 
108 int
110  struct haptic_effect *effect,
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
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
163 {
164  return SDL_SYS_LogicError();
165 }
166 
167 int
169 {
170  return SDL_SYS_LogicError();
171 }
172 
173 int
175 {
176  return SDL_SYS_LogicError();
177 }
178 
179 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */
int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
#define NULL
Definition: ftobjs.h:61
int SDL_SYS_HapticOpen(SDL_Haptic *haptic)
int SDL_SYS_HapticMouse(void)
int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
const char * SDL_SYS_HapticName(int index)
The SDL Haptic subsystem allows you to control haptic (force feedback) devices.
int SDL_SYS_HapticUnpause(SDL_Haptic *haptic)
int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect)
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
The generic template for any haptic effect.
Definition: SDL_haptic.h:787
int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
Definition: SDL_error.c:53
GLuint index
Definition: glew.h:1800
int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data)
int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick)
void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
int SDL_SYS_HapticInit(void)
void SDL_SYS_HapticQuit(void)
void SDL_SYS_HapticClose(SDL_Haptic *haptic)
int SDL_SYS_HapticPause(SDL_Haptic *haptic)
int SDL_SYS_HapticStopAll(SDL_Haptic *haptic)
int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain)
int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations)
int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base)