src/haptic/SDL_haptic.c
branchgsoc2008_force_feedback
changeset 2513 55fd9103a330
parent 2512 ef147ee4896c
child 2514 840e1b6325c0
     1.1 --- a/src/haptic/SDL_haptic.c	Thu Jul 10 08:38:08 2008 +0000
     1.2 +++ b/src/haptic/SDL_haptic.c	Thu Jul 10 11:39:28 2008 +0000
     1.3 @@ -67,7 +67,7 @@
     1.4     int valid;
     1.5     
     1.6     if (*haptic == NULL) {
     1.7 -      SDL_SetError("Haptic device hasn't been opened yet");
     1.8 +      SDL_SetError("Haptic: Device hasn't been opened yet");
     1.9        valid = 0;
    1.10     } else {
    1.11        valid = 1;
    1.12 @@ -93,7 +93,7 @@
    1.13  SDL_HapticName(int device_index)
    1.14  {
    1.15     if ((device_index < 0) || (device_index >= SDL_numhaptics)) {
    1.16 -      SDL_SetError("There are %d haptic devices available", SDL_numhaptics);
    1.17 +      SDL_SetError("Haptic: There are %d haptic devices available", SDL_numhaptics);
    1.18        return NULL;
    1.19     }
    1.20     return SDL_SYS_HapticName(device_index);
    1.21 @@ -110,7 +110,7 @@
    1.22     SDL_Haptic *haptic;
    1.23  
    1.24     if ((device_index < 0) || (device_index >= SDL_numhaptics)) {
    1.25 -      SDL_SetError("There are %d haptic devices available", SDL_numhaptics);
    1.26 +      SDL_SetError("Haptic: There are %d haptic devices available", SDL_numhaptics);
    1.27        return NULL;
    1.28     }
    1.29  
    1.30 @@ -210,7 +210,7 @@
    1.31     device_index = SDL_SYS_HapticMouse();
    1.32  
    1.33     if (device_index < 0) {
    1.34 -      SDL_SetError("Mouse isn't a haptic device.");
    1.35 +      SDL_SetError("Haptic: Mouse isn't a haptic device.");
    1.36        return NULL;
    1.37     }
    1.38  
    1.39 @@ -401,7 +401,7 @@
    1.40  
    1.41     /* Check to see if effect is supported */
    1.42     if (SDL_HapticEffectSupported(haptic,effect)==SDL_FALSE) {
    1.43 -      SDL_SetError("Haptic effect not supported by haptic device.");
    1.44 +      SDL_SetError("Haptic: Effect not supported by haptic device.");
    1.45        return -1;
    1.46     }
    1.47  
    1.48 @@ -417,7 +417,7 @@
    1.49        }
    1.50     }
    1.51  
    1.52 -   SDL_SetError("Haptic device has no free space left.");
    1.53 +   SDL_SetError("Haptic: Device has no free space left.");
    1.54     return -1;
    1.55  }
    1.56  
    1.57 @@ -428,7 +428,7 @@
    1.58  ValidEffect(SDL_Haptic * haptic, int effect)
    1.59  {
    1.60     if ((effect < 0) || (effect >= haptic->neffects)) {
    1.61 -      SDL_SetError("Invalid haptic effect identifier.");
    1.62 +      SDL_SetError("Haptic: Invalid effect identifier.");
    1.63        return 0;
    1.64     }
    1.65     return 1;
    1.66 @@ -518,7 +518,7 @@
    1.67     }
    1.68  
    1.69     if ((haptic->supported & SDL_HAPTIC_STATUS) == 0) {
    1.70 -      SDL_SetError("Haptic device does not support status queries.");
    1.71 +      SDL_SetError("Haptic: Device does not support status queries.");
    1.72        return -1;
    1.73     }
    1.74  
    1.75 @@ -539,12 +539,12 @@
    1.76     }
    1.77  
    1.78     if ((haptic->supported & SDL_HAPTIC_GAIN) == 0) {
    1.79 -      SDL_SetError("Haptic device does not support setting gain.");
    1.80 +      SDL_SetError("Haptic: Device does not support setting gain.");
    1.81        return -1;
    1.82     }
    1.83  
    1.84     if ((gain < 0) || (gain > 100)) {
    1.85 -      SDL_SetError("Haptic gain must be between 0 and 100.");
    1.86 +      SDL_SetError("Haptic: Gain must be between 0 and 100.");
    1.87        return -1;
    1.88     }
    1.89  
    1.90 @@ -582,12 +582,12 @@
    1.91     }
    1.92  
    1.93     if ((haptic->supported & SDL_HAPTIC_AUTOCENTER) == 0) {
    1.94 -      SDL_SetError("Haptic device does not support setting autocenter.");
    1.95 +      SDL_SetError("Haptic: Device does not support setting autocenter.");
    1.96        return -1;
    1.97     }
    1.98  
    1.99     if ((autocenter < 0) || (autocenter > 100)) {
   1.100 -      SDL_SetError("Haptic autocenter must be between 0 and 100.");
   1.101 +      SDL_SetError("Haptic: Autocenter must be between 0 and 100.");
   1.102        return -1;
   1.103     }                                           
   1.104