# HG changeset patch # User Edgar Simo # Date 1218037148 0 # Node ID dbd63c419ba5f07cf74c67a7cd0886c2b79f664c # Parent 6b0d1f494c10904c58662f179e6b4ed169b883b3 Correctness patch my alam. diff -r 6b0d1f494c10 -r dbd63c419ba5 src/haptic/linux/SDL_syshaptic.c --- 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) ?