include/SDL_haptic.h
branchgsoc2008_force_feedback
changeset 2501 ff12f79dfc8d
parent 2500 5251d0510b7e
child 2502 5356ca0c36a3
equal deleted inserted replaced
2500:5251d0510b7e 2501:ff12f79dfc8d
    58  *
    58  *
    59  *    // Create the effect
    59  *    // Create the effect
    60  *    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
    60  *    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
    61  *    effect.type = SDL_HAPTIC_SINE;
    61  *    effect.type = SDL_HAPTIC_SINE;
    62  *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
    62  *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
    63  *    effect.periodic.direction.dir[0] = 180000; // Force comes from south
    63  *    effect.periodic.direction.dir[0] = 18000; // Force comes from south
    64  *    effect.periodic.period = 1000; // 1000 ms
    64  *    effect.periodic.period = 1000; // 1000 ms
    65  *    effect.periodic.magnitude = 20000; // 20000/32767 strength
    65  *    effect.periodic.magnitude = 20000; // 20000/32767 strength
    66  *    effect.periodic.length = 5000; // 5 seconds long
    66  *    effect.periodic.length = 5000; // 5 seconds long
    67  *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
    67  *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
    68  *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away
    68  *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away