Skip to content

Commit

Permalink
Improve DirectInput FFB compatibility #444
Browse files Browse the repository at this point in the history
  • Loading branch information
matlo committed Mar 15, 2017
1 parent 4b898b2 commit 1295e76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions shared/gasync/src/input/sdl/sdlinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ static void open_haptic(int id, SDL_Joystick* joystick) {
break;
case SDL_HAPTIC_CONSTANT:
effect.constant.length = SDL_HAPTIC_INFINITY;
effect.constant.direction.type = SDL_HAPTIC_X_FORCE;
effect.constant.direction.type = SDL_HAPTIC_FIRST_AXIS;
effect.constant.direction.dir[0] = 0;
break;
case SDL_HAPTIC_SPRING:
case SDL_HAPTIC_DAMPER:
effect.condition.length = SDL_HAPTIC_INFINITY;
effect.condition.direction.type = SDL_HAPTIC_X_FORCE;
effect.condition.direction.type = SDL_HAPTIC_FIRST_AXIS;
effect.condition.direction.dir[0] = 0;
break;
}
Expand Down Expand Up @@ -742,7 +742,7 @@ int sdlinput_joystick_set_haptic(const GE_Event * event)
{
effect_id = get_effect_id(event->which, GE_HAPTIC_CONSTANT);
effect.constant.type = SDL_HAPTIC_CONSTANT;
effect.constant.direction.type = SDL_HAPTIC_X_FORCE;
effect.constant.direction.type = SDL_HAPTIC_FIRST_AXIS;
effect.constant.direction.dir[0] = 0;
effect.constant.length = SDL_HAPTIC_INFINITY;
effect.constant.level = event->jconstant.level;
Expand All @@ -753,7 +753,7 @@ int sdlinput_joystick_set_haptic(const GE_Event * event)
{
effect_id = get_effect_id(event->which, GE_HAPTIC_SPRING);
effect.condition.type = SDL_HAPTIC_SPRING;
effect.condition.direction.type = SDL_HAPTIC_X_FORCE;
effect.condition.direction.type = SDL_HAPTIC_FIRST_AXIS;
effect.condition.direction.dir[0] = 0;
effect.condition.length = SDL_HAPTIC_INFINITY;
effect.condition.right_sat[0] = event->jcondition.saturation.right;
Expand All @@ -769,7 +769,7 @@ int sdlinput_joystick_set_haptic(const GE_Event * event)
{
effect_id = get_effect_id(event->which, GE_HAPTIC_DAMPER);
effect.condition.type = SDL_HAPTIC_DAMPER;
effect.condition.direction.type = SDL_HAPTIC_X_FORCE;
effect.condition.direction.type = SDL_HAPTIC_FIRST_AXIS;
effect.condition.direction.dir[0] = 0;
effect.condition.length = SDL_HAPTIC_INFINITY;
effect.condition.right_sat[0] = event->jcondition.saturation.right;
Expand Down

0 comments on commit 1295e76

Please sign in to comment.