Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Correctness patch my alam.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Aug 6, 2008
1 parent 07685e3 commit ff969bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/haptic/linux/SDL_syshaptic.c
Expand Up @@ -506,7 +506,7 @@ SDL_SYS_ToDirection( SDL_HapticDirection * dir )

default:
SDL_SetError("Haptic: Unsupported direction type.");
return -1;
return (Uint16)-1;
}

return 0;
Expand Down Expand Up @@ -537,7 +537,7 @@ SDL_SYS_ToFFEffect( struct ff_effect * dest, SDL_HapticEffect * src )
/* 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) ?
Expand Down Expand Up @@ -569,7 +569,7 @@ SDL_SYS_ToFFEffect( struct ff_effect * dest, SDL_HapticEffect * src )
/* 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) ?
Expand Down Expand Up @@ -656,7 +656,7 @@ SDL_SYS_ToFFEffect( struct ff_effect * dest, SDL_HapticEffect * src )
/* 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) ?
Expand Down

0 comments on commit ff969bf

Please sign in to comment.