src/haptic/linux/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2634 dbd63c419ba5
parent 2561 3696b9ce8a37
child 2635 318e67011ad9
--- a/src/haptic/linux/SDL_syshaptic.c	Wed Aug 06 11:10:44 2008 +0000
+++ b/src/haptic/linux/SDL_syshaptic.c	Wed Aug 06 15:39:08 2008 +0000
@@ -506,7 +506,7 @@
 
       default:
          SDL_SetError("Haptic: Unsupported direction type.");
-         return -1;
+         return (Uint16)-1;
    }
 
    return 0;
@@ -537,7 +537,7 @@
          /* Header */
          dest->type = FF_CONSTANT;
          dest->direction = SDL_SYS_ToDirection(&constant->direction);
-         if (dest->direction < 0) return -1;
+         if (dest->direction == (Uint16)-1) return -1;
 
          /* Replay */
          dest->replay.length = (constant->length == SDL_HAPTIC_INFINITY) ?
@@ -569,7 +569,7 @@
          /* Header */
          dest->type = FF_PERIODIC;
          dest->direction = SDL_SYS_ToDirection(&periodic->direction);
-         if (dest->direction < 0) return -1;
+         if (dest->direction == (Uint16)-1) return -1;
          
          /* Replay */
          dest->replay.length = (periodic->length == SDL_HAPTIC_INFINITY) ? 
@@ -656,7 +656,7 @@
          /* Header */
          dest->type = FF_RAMP;
          dest->direction = SDL_SYS_ToDirection(&ramp->direction);
-         if (dest->direction < 0) return -1;
+         if (dest->direction == (Uint16)-1) return -1;
 
          /* Replay */
          dest->replay.length = (ramp->length == SDL_HAPTIC_INFINITY) ?