src/haptic/dummy/SDL_syshaptic.c
author Edgar Simo <bobbens@gmail.com>
Sun, 24 Aug 2008 17:17:45 +0000
branchgsoc2008_force_feedback
changeset 2645 269ba4f28d0e
parent 2544 2a61a38dd138
child 2646 9408be170bff
permissions -rw-r--r--
Added support for pausing/unpausing haptic devices.
     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 int
    31 SDL_SYS_HapticInit(void)
    32 {
    33    return 0;
    34 }
    35 
    36 
    37 const char *
    38 SDL_SYS_HapticName(int index)
    39 {
    40    SDL_SetError("Logic error: No haptic devices available.");
    41    return NULL;
    42 }
    43 
    44 
    45 int
    46 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
    47 {
    48    SDL_SetError("Logic error: No haptic devices available.");
    49    return -1;
    50 }
    51 
    52 
    53 int
    54 SDL_SYS_HapticMouse(void)
    55 {
    56    return -1;
    57 }
    58 
    59 
    60 int
    61 SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
    62 {
    63    return 0;
    64 }
    65 
    66 
    67 int
    68 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
    69 {
    70    SDL_SetError("Logic error: No haptic devices available.");
    71    return -1;
    72 }
    73 
    74 
    75 int
    76 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
    77 {
    78    return 0;
    79 }
    80 
    81 
    82 void
    83 SDL_SYS_HapticClose(SDL_Haptic * haptic)
    84 {
    85    return;
    86 }
    87 
    88 
    89 void
    90 SDL_SYS_HapticQuit(void)
    91 {
    92    return;
    93 }
    94 
    95 
    96 int
    97 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
    98                         struct haptic_effect * effect,
    99                         SDL_HapticEffect * base)
   100 {
   101    SDL_SetError("Logic error: No haptic devices available.");
   102    return -1;
   103 }
   104 
   105 
   106 int
   107 SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
   108                            struct haptic_effect * effect,
   109                            SDL_HapticEffect * data)
   110 {
   111    SDL_SetError("Logic error: No haptic devices available.");
   112    return -1;
   113 }
   114 
   115 
   116 int
   117 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect * effect, Uint32 iterations)
   118 {
   119    SDL_SetError("Logic error: No haptic devices available.");
   120    return -1;
   121 }
   122 
   123 
   124 int
   125 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
   126 {
   127    SDL_SetError("Logic error: No haptic devices available.");
   128    return -1;
   129 }
   130 
   131 
   132 void
   133 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
   134 {
   135    SDL_SetError("Logic error: No haptic devices available.");
   136    return;
   137 }
   138 
   139 
   140 int SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, struct haptic_effect * effect)
   141 {
   142    SDL_SetError("Logic error: No Haptic devices available.");
   143    return -1;
   144 }
   145 
   146 
   147 int
   148 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
   149 {
   150    SDL_SetError("Logic error: No haptic devices available.");
   151    return -1;
   152 }
   153 
   154 
   155 int
   156 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
   157 {
   158    SDL_SetError("Logic error: No haptic devices available.");
   159    return -1;
   160 }
   161 
   162 int
   163 SDL_SYS_HapticPause(SDL_Haptic * haptic)
   164 {
   165    SDL_SetError("Logic error: No haptic devices available.");
   166    return -1;
   167 }
   168 
   169 int
   170 SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
   171 {
   172    SDL_SetError("Logic error: No haptic devices available.");
   173    return -1;
   174 }
   175 
   176 
   177 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */