src/haptic/dummy/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2492 31444718601e
parent 2474 3f80bf1528b4
child 2495 66c02abeef0e
equal deleted inserted replaced
2491:10bc7aaf5114 2492:31444718601e
    30 
    30 
    31 int
    31 int
    32 SDL_SYS_HapticInit(void)
    32 SDL_SYS_HapticInit(void)
    33 {
    33 {
    34    SDL_numhaptics = 0;
    34    SDL_numhaptics = 0;
    35    return (0);
    35    return 0;
    36 }
    36 }
    37 
    37 
    38 
    38 
    39 const char *
    39 const char *
    40 SDL_SYS_HapticName(int index)
    40 SDL_SYS_HapticName(int index)
    41 {
    41 {
    42    SDL_SetError("Logic error: No haptic (force feedback) devices available");
    42    SDL_SetError("Logic error: No haptic devices available.");
    43    return (NULL);
    43    return NULL;
    44 }
    44 }
    45 
    45 
    46 
    46 
    47 int
    47 int
    48 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
    48 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
    49 {
    49 {
    50    SDL_SetError("Logic error: No joysticks available");
    50    SDL_SetError("Logic error: No haptic devices available.");
    51    return (-1);
    51    return -1;
       
    52 }
       
    53 
       
    54 
       
    55 int
       
    56 SDL_JoystickIsHaptic(SDL_Joystick * joystick)
       
    57 {
       
    58    return 0;
       
    59 }
       
    60 
       
    61 
       
    62 int
       
    63 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
       
    64 {
       
    65    SDL_SetError("Logic error: No haptic devices available.");
       
    66    return -1;
       
    67 }
       
    68 
       
    69 
       
    70 int
       
    71 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
       
    72 {
       
    73    return 0;
    52 }
    74 }
    53 
    75 
    54 
    76 
    55 void
    77 void
    56 SDL_SYS_HapticClose(SDL_Haptic * haptic)
    78 SDL_SYS_HapticClose(SDL_Haptic * haptic)
    64 {
    86 {
    65    return;
    87    return;
    66 }
    88 }
    67 
    89 
    68 
    90 
       
    91 int
       
    92 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
       
    93                         struct haptic_effect * effect,
       
    94                         SDL_HapticEffect * base)
       
    95 {
       
    96    SDL_SetError("Logic error: No haptic devices available.");
       
    97    return -1;
       
    98 }
       
    99 
       
   100 
       
   101 int
       
   102 SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
       
   103                            struct haptic_effect * effect,
       
   104                            SDL_HapticEffect * data)
       
   105 {
       
   106    SDL_SetError("Logic error: No haptic devices available.");
       
   107    return -1;
       
   108 }
       
   109 
       
   110 
       
   111 int
       
   112 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
       
   113 {
       
   114    SDL_SetError("Logic error: No haptic devices available.");
       
   115    return -1;
       
   116 }
       
   117 
       
   118 
       
   119 int
       
   120 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
       
   121 {
       
   122    SDL_SetError("Logic error: No haptic devices available.");
       
   123    return -1;
       
   124 }
       
   125 
       
   126 
       
   127 void
       
   128 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
       
   129 {
       
   130    SDL_SetError("Logic error: No haptic devices available.");
       
   131    return -1;
       
   132 }
       
   133 
       
   134 
       
   135 int
       
   136 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
       
   137 {
       
   138    SDL_SetError("Logic error: No haptic devices available.");
       
   139    return -1;
       
   140 }
       
   141 
       
   142 
       
   143 int
       
   144 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
       
   145 {
       
   146    SDL_SetError("Logic error: No haptic devices available.");
       
   147    return -1;
       
   148 }
       
   149 
       
   150 
    69 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */
   151 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */