[SVN] r3922 - branches/gsoc2008_force_feedback/src/haptic/linux

svn-owner at libsdl.org svn-owner at libsdl.org
Wed Aug 6 08:39:08 PDT 2008


Author: bobbens
Date: 2008-08-06 08:39:08 -0700 (Wed, 06 Aug 2008)
New Revision: 3922

Modified:
   branches/gsoc2008_force_feedback/src/haptic/linux/SDL_syshaptic.c
Log:
Correctness patch my alam.


Modified: branches/gsoc2008_force_feedback/src/haptic/linux/SDL_syshaptic.c
===================================================================
--- branches/gsoc2008_force_feedback/src/haptic/linux/SDL_syshaptic.c	2008-08-06 11:49:28 UTC (rev 3921)
+++ branches/gsoc2008_force_feedback/src/haptic/linux/SDL_syshaptic.c	2008-08-06 15:39:08 UTC (rev 3922)
@@ -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) ? 



More information about the SVN mailing list