sdl

FORK: Simple Directmedia Layer
git clone https://git.neptards.moe/neptards/sdl.git
Log | Files | Refs

SDL_syshaptic.c (3402B)


      1 /*
      2   Simple DirectMedia Layer
      3   Copyright (C) 1997-2020 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_internal.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 int
     43 SDL_SYS_NumHaptics(void)
     44 {
     45     return 0;
     46 }
     47 
     48 const char *
     49 SDL_SYS_HapticName(int index)
     50 {
     51     SDL_SYS_LogicError();
     52     return NULL;
     53 }
     54 
     55 
     56 int
     57 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
     58 {
     59     return SDL_SYS_LogicError();
     60 }
     61 
     62 
     63 int
     64 SDL_SYS_HapticMouse(void)
     65 {
     66     return -1;
     67 }
     68 
     69 
     70 int
     71 SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
     72 {
     73     return 0;
     74 }
     75 
     76 
     77 int
     78 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
     79 {
     80     return SDL_SYS_LogicError();
     81 }
     82 
     83 
     84 int
     85 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
     86 {
     87     return 0;
     88 }
     89 
     90 
     91 void
     92 SDL_SYS_HapticClose(SDL_Haptic * haptic)
     93 {
     94     return;
     95 }
     96 
     97 
     98 void
     99 SDL_SYS_HapticQuit(void)
    100 {
    101     return;
    102 }
    103 
    104 
    105 int
    106 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
    107                         struct haptic_effect *effect, SDL_HapticEffect * base)
    108 {
    109     return SDL_SYS_LogicError();
    110 }
    111 
    112 
    113 int
    114 SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
    115                            struct haptic_effect *effect,
    116                            SDL_HapticEffect * data)
    117 {
    118     return SDL_SYS_LogicError();
    119 }
    120 
    121 
    122 int
    123 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
    124                         Uint32 iterations)
    125 {
    126     return SDL_SYS_LogicError();
    127 }
    128 
    129 
    130 int
    131 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
    132 {
    133     return SDL_SYS_LogicError();
    134 }
    135 
    136 
    137 void
    138 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
    139 {
    140     SDL_SYS_LogicError();
    141     return;
    142 }
    143 
    144 
    145 int
    146 SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
    147                               struct haptic_effect *effect)
    148 {
    149     return SDL_SYS_LogicError();
    150 }
    151 
    152 
    153 int
    154 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
    155 {
    156     return SDL_SYS_LogicError();
    157 }
    158 
    159 
    160 int
    161 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
    162 {
    163     return SDL_SYS_LogicError();
    164 }
    165 
    166 int
    167 SDL_SYS_HapticPause(SDL_Haptic * haptic)
    168 {
    169     return SDL_SYS_LogicError();
    170 }
    171 
    172 int
    173 SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
    174 {
    175     return SDL_SYS_LogicError();
    176 }
    177 
    178 int
    179 SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
    180 {
    181     return SDL_SYS_LogicError();
    182 }
    183 
    184 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */
    185 
    186 /* vi: set ts=4 sw=4 expandtab: */